<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="content-type">
  <title>Dead Souls Creator FAQ</title>
  <link rel="icon" href="./favicon.ico" type="image/x-icon">
  <link rel="shortcut icon" href="./favicon.ico" type="image/x-icon">
</head>
<body>
<big style="font-family: courier new;"><span style="font-weight: bold;">Dead
Souls Creator FAQ</span><br>
<br>
Written by Cratylus @ Dead Souls<br>
<br>
Updated May 2008.<br>
<span style="font-weight: bold; text-decoration: underline;"><br>
</span>Note: commands are
displayed in boldface, like this: <span style="font-weight: bold;">ls
-a</span><span style="font-weight: bold; text-decoration: underline;"><br>
<br>
What's this FAQ about?</span><br>
<br>
There are common issues and
questions that crop<br>
up for most new creators. This
document is intended to<br>
ease or at least shorten what can
be a steep learning<br>
curve.<br>
<br>
<br>
<span style="font-weight: bold;">Section 1:
Getting Started</span><br>
<br>
<a href="ds-creator-faq.html#1.1">1.1
My question isn't on here. Where can I get an answer?</a><br>
<br>
<a href="#1.2">1.2 The ds channel is
too spammy. It's distracting me.</a><br>
<br>
<a href="#1.3">1.3 All I did was change
one thing in a file, and now it won't update. Help!</a><br>
<br>
<a href="#1.4">1.4 The mud editor is
confusing the heck out of me. It's too hard to use.</a><br>
<br>
<a href="#1.5">1.5 When I log in,
everything is screwed up, and I can't do anything!</a><br>
<br>
<a href="#1.6">1.6 Ok, I'm a creator
now. What am I supposed to do?</a><br>
<br>
<a href="#1.7">1.7 This is
weird...where is the online builder? How does new stuff get compiled?</a><br>
<br>
<a href="#1.8">1.8 I explored around in
/domains/Ylsrim and &lt;XYZ&gt; is broken</a><br>
<br>
<a href="#1.9">1.9 I explored around in
/domains/town and &lt;XYZ&gt; is broken</a><br>
<br>
<a href="#1.10">1.10 What are the known
bugs and problems in Dead Souls?</a><br>
<br>
<a href="#1.11">1.11 Why do you keep
asking me to post my code?</a><br>
<br>
<a href="#1.12">1.12 "help modify" breaks.</a><br>
<br>
<a href="#1.13">1.13 There are no help files!</a><br>
<br>
<a href="#1.14">1.14 Where are the help files for skills and stats?</a><br>
<br>
<br>
<span style="font-weight: bold;">Section 2: Code</span><br>
<br>
<a href="#2.1">2.1 What's the QCS?</a><br>
<br>
<a href="#2.2">2.2 SetUnique doesn't
work.</a><br>
<br>
<a href="#2.3">2.3 I made a magic wand
that disappears after 10 minutes. </a><br>
<a href="#2.3">But if a player logs out
and log back in, they have another 10 minutes! </a><br>
<a href="#2.3">How do I fix this?</a><br>
<br>
<a href="#2.4">2.4 Where is it saved?</a><br>
<br>
<a href="#2.5">2.5 How do I add or
remove emotes?</a><br>
<a href="#2.6"><br>
2.6 How can I tell what files something inherits?</a><br>
<br>
<a href="#2.7">2.7 How can I find the
filename of something?</a><br>
<br>
<a href="#2.8">2.8 What's the largest
integer usable by the mud?</a><br>
<br>
<a href="#2.9">2.9 How can I find out
what functions exist in something?<br>
</a><br>
<a href="#2.10">2.10 object::init() is
broken!</a><br>
<br>
<a href="#2.11">2.11
if(ob-&gt;GetFoo()) seems to break, but I don't know why</a><br>
<br>
<a href="#2.12">2.12 How do I add color
to my descriptions?<br>
</a><br>
<a href="#2.13">2.13 How do I turn the
integer 42 into the string "forty-two"?</a><br>
<br>
<a href="#2.14">2.14 Can I use !=NULL
as a test?</a><br>
<br>
<a href="#2.15">2.15 I want to create
and test a new command for the mud, </a><br>
<a href="#2.15">but I'm not admin so I
can't put anything in the normal command paths. </a><br>
<a href="#2.15">What can I do?</a><br>
<br>
<a href="#2.16">2.16 How do skills work?</a><br>
<br>
<a href="#2.17">2.17 How do classes
work?</a><br>
<br>
<a href="#2.18">2.18 How do virtual
rooms work?<br>
</a><br>
<a href="#2.19">2.19 How are files
organized in Dead Souls?</a><br>
<br>
<a href="#2.20">2.20 What are applies, lfuns,
sefuns and efuns?</a><br>
<br>
<a href="#2.21">2.21 Why are there more
sefun doc files than sefun files?</a><br>
<br>
<a href="#2.22">2.22 I edited a file
but now the reload command is complaining.</a><br>
<br>
<a href="#2.23">2.23
this_player()-&gt;GetName() returns "A shadow" when the player is invis.<br>
</a><br>
<a href="#2.24">2.24 Is there a sefun
for making a whole string uppercase?</a><br>
<br>
<a href="#2.25">2.25 What is the
difference between filter() and foreach()? How do I use them?</a><br>
<br>
<a href="#2.26">2.26 member_array() is
returning exactly the wrong thing</a><br>
<br>
<a href="#2.27">2.27 I'm trying to add
two mappings together and the results are bizarre</a><br>
<br>
<a href="#2.28">2.28 When str = "abc",
str[1] is 98, not "b". What gives?</a><br>
<br>
<a href="#2.29">2.29 How do I make an
array1 that is the same as array2 but without an element</a>?<br>
<br>
<a href="#2.30">2.30 How do I pass
arguments to a pointer in a functional?</a><br>
<br>
<a href="#2.31">2.31 What does the tc()
sefun do?</a><br>
<br>
<a href="#2.32">2.32 How can I find out
how many items are in an array quickly?</a><br>
<br>
<a href="#2.33">2.33 My SetRead isn't
working</a><br>
<br>
<a href="#2.34">2.34 My
SetEnters/SetSmells/SetListens isn't working<br>
</a><br>
<a href="#2.35">2.35 Can I nest loops?</a><br>
<br>
<a href="#2.36">2.36 What should I do
or not do in my code?</a><br>
<br>
<a href="#2.37">2.37 How much different
or heavily modified is Dead Souls than stock LPC?</a><br>
<br>
<a href="ds-creator-faq.html#2.38">2.38
Is there a way to change the "default exit" room messages?</a><br>
<br>
<a href="#2.39">2.39 This dummy item is
not at all behaving like I expected.</a><br>
<br>
<a href="#2.40">2.40 Clan objects do
nothing but screw things up.</a><br>
<br>
<a href="#2.41">2.41 My NPC's stats are
all hosed up.</a><br>
<br>
<a href="#2.42">2.42 This squirrel is
taking *forever* to kill.</a><br>
<br>
<a href="#2.43">2.43 My room should not
be entered/exited by just anyone. How<br>
do I control this?</a><br>
<br>
<a href="#2.44">2.44 I zapped a
monster, but instead of being dead, now it's undead!</a><br>
<br>
<a href="#2.45">2.45 How does the
format for race files work?</a><br>
<br>
<a href="#2.46">2.46 How does the
format for class files work?</a><br>
<br>
<a href="#2.47">2.47 What do Properties
do?</a><br>
<br>
<a href="#2.48">2.48 How do I add a
prehensile limb to a player or NPC?</a><br>
<br>
<a href="#2.49">2.49 How do I make a
room occasionally display messages?</a><br>
<br>
<a href="#2.50">2.50 My functional
isn't working!</a><br>
<br>
<a href="#2.51">2.51 I've read the
Creator's Manual but I still don't understand mappings and arrays.</a><br>
<br>
<a href="#2.52">2.52 Why are call_outs
so bad?</a><br>
<br>
<a href="#2.53">2.53 Fine. How am I
supposed to create timed events, then?</a><br>
<br>
<a href="#2.54">2.54 I need a list of
all the functions available.</a><br>
<br>
<a href="#2.55">2.55 How do I make an
object you can [ jump on | climb | etc ] ?</a><br>
<br>
<a href="#2.56">2.56 Where is the list
of available skills? How do I add skills?</a><br>
<a href="#2.57"><br>
2.57 Where is the list of available classes? How do I add a class?</a><br>
<br>
<a href="#2.58">2.58 Where is the list
of available races? </a><br>
<br>
<a href="#2.59">2.59 How do languages
work? Is there a list of them?</a><br>
<br>
<a href="#2.60">2.60 When I try to call
test-&gt;SetLanguage("Bozo", 50), it sets it to 100%</a><br>
<br>
<a href="#2.61">2.61 How do I update an
.h file?</a><br>
<br>
<a href="#2.62">2.62 I want to put an
object in a room that doesn't show up in the inventory<br>
but it can be manipulated.</a><br>
<br>
<a href="#2.63">2.63 What is pass by
reference? What is pass by value?</a><br>
<br>
<a href="#2.64">2.64 ZOMG pass by
reference is terrible! How do I avoid it?</a><br>
<br>
<a href="#2.65">2.65 What does the ::
operator do?</a><br>
<br>
<a href="#2.67">2.67 I know this file
is fine. I copied it from another file that<br>
works, but it won't update. This is driving me insane.</a><br>
<br>
<a href="#2.68">2.68 What is
SetEncounter supposed to do</a><a href="#2.68">?</a><br>
<br>
</big><big style="font-family: courier new;"><a href="#2.69">2.69
I keep getting "This should be edited by hand.Change cancelled."</a></big><small
 style="font-family: courier new;"><br>
<br>
<a href="#2.70"><big><big>2.70 zOMGLOLERZ I did what said but no
my workrom really IS broke!!1!</big></big></a></small><span
 style="font-family: courier new;">
</span><big style="font-family: courier new;"><br>
<br>
<a href="#2.71">2.71 I can't find the SetQuatloos() lfun anywhere!</a><br>
<br>
<a href="#2.72">2.72 You said that what I want to do requires a daemon.
I am afraid.</a><br>
<br>
</big><big style="font-family: courier new;"><a href="#2.73">2.73 LOL I
tried to
show something to someone in the shop
but the vendor gave an error.</a><br>
<br>
<a href="#2.74">2.74 My object keps failing with an eval cost too high
error.</a></big><br>
<br>
<a href="#2.75"><big style="font-family: courier new;">2.75 Please
explain ( foo ? bar : baz )</big></a><br>
<br>
<a href="#2.76"><big style="font-family: courier new;">2.76 Where are
things like Town and race and starting money set for new players?</big></a><br>
<br>
<a href="#2.77"><big style="font-family: courier new;">2.77 How do I
make my NPC respawn sooner than the reset interval?</big></a><br>
<br>
<a href="#2.78"><big style="font-family: courier new;">2.78 My
TalkResponse NPC doesn't work, but it really really should!</big></a><big
 style="font-family: courier new;"><br>
<br>
</big><big style="font-family: courier new;"><br>
<span style="font-weight: bold;">Section 3:
Intermud and channel stuff</span><br>
<br>
<a href="#3.1">3.1 How do I know what
other muds are online on intermud?</a><br>
<br>
<a href="#3.2">3.2 Hey, LeetFooMud is
online! How can I tell if Biff is logged on?</a><br>
<br>
<a href="#3.3">3.3 That's
weird...mudlist says LeetFooMud is there but I'm not getting anything
back.</a><br>
<br>
<a href="#3.4">3.4 I heard there are
intermud channels that talk between other muds, </a><br>
<a href="#3.4">not just Dead Souls
muds. How can I use them?<br>
</a><br>
<a href="#3.5">3.5 How do I emote on a
channel?</a><br>
<br>
<a href="#3.6">3.6 How do I see what I
missed on a channel?</a><br>
<br>
<a href="#3.7">3.7 I am sick and tired
of the intermud network going down. Please fix it.</a><br>
<br>
<a href="#3.8">3.8 I just wanna chat.
Is there a dschat channel?</a><br>
<br>
<a href="#3.9">3.9 I'll spam if I want
to. You're not the boss of me.<br>
</a><br>
<a href="#3.10">3.10 This guy keeps
hassling me on an intermud channel</a><br>
<br>
<a href="#3.11">3.11 What's the deal
with channel rules and banning and whatnot?</a><br>
<a href="#3.12"><br>
3.12 Hello? Anyone here? Can someone answer a question for me?</a><br>
<br>
<a href="#3.13">3.13 How come people on IMC2 can't rwho me?</a><br>
<br>
</big><a href="#3.14"><big style="font-family: courier new;">3.14 How
do I find someone on Intermud-3?</big></a><big
 style="font-family: courier new;"><a href="#3.13">?</a><br>
<br>
<br>
<span style="font-weight: bold;">Section 4:
Miscellanea</span><br>
<br>
<a href="#4.1">4.1 I'm fighting the
beggar with my staff and he's kicking my ass</a><br>
<br>
<a href="#4.2">4.2 Someone amputated
all my limbs and I can't do anything!</a><br>
<br>
<a href="#4.3">4.3 How do I change my
class?</a><br>
<br>
<a href="#4.4">4.4 People are talking
to me in gibberish, even though it says they're speaking English.</a><br>
<br>
<a href="#4.5">4.5 What's this about
Biff "unknowingly" telling me something?<br>
</a><br>
<a href="#4.6">4.6 How do I find the
location of a verb or command?</a><br>
<br>
<a href="#4.7">4.7 Where is the "exa"
command? Where is the "n" command?</a><br>
<br>
<a href="#4.8">4.8 How do I get
something to happen to a random person in a room?</a><br>
<br>
<a href="#4.9">4.9 My wandering monster
escaped from my workroom! How can I find him?</a><br>
<br>
<a href="#4.10">4.10 I ran findobj on
something but it says no environment. Where is it?</a><br>
<br>
<a href="#4.11">4.11 How do I update
everything in a directory?</a><br>
<br>
<a href="#4.12">4.12 I don't like
getting colors on my screen. How do I stop it?</a><br>
<br>
<a href="#4.13">4.13 Um...I want colors
back now please</a><br>
<br>
<a href="#4.14">4.14 I can type 'n' and
move north, but 'north' doesn't work.</a><br>
<br>
<a href="#4.15">4.15 Why is there a
bunch of stuff in ROOMS_FURNACE?</a><br>
<a href="#4.16"><br>
</a><a href="#4.16">4.16 How do I
change my screen and terminal settings?</a><br>
<br>
<a href="#4.17">4.17 ZOMG this is the
best mudlib evar how can I evar thank you?</a><br>
<br>
<a href="#4.18">4.18 Dude this mudlib
sux0rz @ss. What a waste of my time.</a><br>
<br>
<a href="#4.19">4.19 I'm seeing a
filename but I can't read it.</a><br>
<br>
<a href="#4.20">4.20 Is there a command
to go back to your previous directory<br>
without having to type it all out again?</a><br>
<a href="#4.21"><br>
4.21 When I'm in combat, I keep getting messages about not being<br>
able to fight while carrying stuff, but I only have X, Y, and Z on me.</a><br>
<br>
<a href="#4.22">4.22 How do light sources work?</a><br>
<br>
</big><big style="font-family: courier new;"><a href="#4.23">4.23 When
I control
an NPC, sometimes my commands fail
oddly.</a><br>
<br>
<a href="#4.24">4.24 How do I make myself able to cast my new spell?</a><br>
</big><big style="font-family: courier new;"><br>
<br>
<span style="font-weight: bold;">Section 5:
Building</span><br>
<br>
<a href="#5.1">5.1 QCS is putting stuff
where I don't want it.</a><br>
<br>
<a href="#5.2">5.2 How do I make a
blank room, instead of copying the current one?</a><br>
<br>
<a href="#5.3">5.3 How do I build an
area?</a><br>
<br>
<a href="#5.4">5.4 How do I make a
quest?</a><br>
<br>
<a href="#5.5">5.5 Where's Leo?</a><br>
<br>
<a href="#5.6">5.6 Where are the
vehicles and mounts?</a><br>
<br>
<a href="#5.7">5.7 I'm having trouble
adding meals to my barkeep with QCS.</a><br>
<br>
<a href="#5.8">5.8 I heard DS has
stargates. Where's an example?</a><br>
<br>
<a href="#5.9">5.9 I created a vendor,
but he isn't responding to the "list" command.</a><br>
<br>
<a href="#5.10">5.10 I gave room with a
default smell but I cannot get any other smells </a><br>
<a href="#5.10">in there,such as 'smell
object' for example</a><br>
<br>
</big><big style="font-family: courier new;"><a href="#5.11">5.11
How do I make a weapon more powerful?</a><br>
<br>
<a href="#5.12">5.12 My NPC refuses to
wield his weapon.</a></big><small style="font-family: courier new;"><br>
</small><big style="font-family: courier new;"><br>
</big><a href="#5.13"><big style="font-family: courier new;">5.13 How
do I add colors to exits?</big></a><br>
<big style="font-family: courier new;"><br>
</big><big style="font-family: courier new;"><a href="#5.14">5.14 How
do i refresh a room?</a><br>
<br>
<a href="#5.15">5.15 The new room I created with QCS has SetItems I
don't want</a></big><a href="#5.15"><big
 style="font-family: courier new;"><br>
</big></a><br>
<a href="#5.15"><big style="font-family: courier new;"></big></a><big
 style="font-family: courier new;"><a href="#5.16">5.16
I'm trying to set my fighter to have a strength of 50 but it won't work.</a></big><big
 style="font-family: courier new;"><br>
<br>
<br>
</big>
<hr style="width: 100%; height: 2px; font-family: courier new;"><big
 style="font-family: courier new;"><span style="font-weight: bold;">Section
1: Getting
Started</span><br>
<br style="font-weight: bold; text-decoration: underline;">
<br style="font-weight: bold; text-decoration: underline;">
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="1.1"></a><span
 style="font-weight: bold; text-decoration: underline;">1.1
My question isn't on here. Where can I get an answer?</span><br>
<br>
There are five main ways to get
specific answers:<br>
<br>
<span style="font-weight: bold;">1)</span> Ask your mud's
administrator, or
other creators on<br>
your mud by using the cre
channel, like this:<br>
<br>
<span style="font-weight: bold;">cre does the
flux capacitor use verbs or add_actions?</span><br>
<br>
To know what local channels are
available on your<br>
mud, type: <span style="font-weight: bold;">lines</span><br>
<br>
<br>
<span style="font-weight: bold;">2)</span> Your mud is probably on the
intermud3
network. If<br>
your administrator has not
restricted intermud channels,<br>
you should be able to ask
questions on the Dead Souls<br>
intermud channel, with a command
like this:<br>
<br>
<span style="font-weight: bold;">ds hi! can
someone tell me what room Leo lives in?</span><br>
<br>
<br>
<span style="font-weight: bold;">3)</span> If intermud is down, or
nobody is
answering, or<br>
you have a bug to report, you can
also try emailing<br>
me, the author of this doc, at:
&lt;my name here&gt;@comcast.net<br>
This is a long shot, as I prefer to answer things on<br>
the forum, where more than just one person will<br>
benefit. Note that I just might post your emailed<br>
question on the forum, if I think that's appropriate.<br>
<br>
<br>
<span style="font-weight: bold;">4)</span> If intermud is down, you can
also log
into the<br>
Dead Souls demo mud at <a href="telnet://dead-souls.net:8000">dead-souls.net
8000
</a><br>
This mud automatically promotes
users to<br>
creator status, allowing guests
to get a feel for<br>
what developing on Dead Souls is
like.<br>
You can try to log into that mud
and see if anyone<br>
is available to answer your
question. Intermud is disabled<br>
for new users there, though, so
you won't be able to use the ds line<br>
to ask questions.<br>
<br>
<br>
<span style="font-weight: bold;">5)</span> There is also the <a
 href="http://lpmuds.net/forum/">Dead Souls Forum at
http://lpmuds.net/forum/</a><br>
This is a really great place to ask for a few reasons:<br>
<br>
- If someone doesn't know the answer right away, eventually <br>
&nbsp; someone probably will.<br>
- Sometimes people on intermud know the answer, but are busy and just<br>
&nbsp; don't have the time to answer. On the forum, this is less the
case.<br>
- Some questions have answers that are long, and intermud folks<br>
&nbsp; may not want to spend the time on an elaborate answer to a
question<br>
&nbsp; that they'll probably see someone else ask later. On a forum,<br>
&nbsp; the responder can be reasonably sure that her help will be useful<br>
&nbsp; not just to you, but to many others. <br>
- You can post detailed error messages and logs, and the files(s)<br>
&nbsp; that are giving you trouble. That way many eyes can analyze<br>
&nbsp; your problem in depth.<br>
- Once resolved, other people can later refer to that problem so<br>
&nbsp; they don't have to ask the same question, or reinvent the wheel.<br>
<br>
<br>
<br>
<span style="font-weight: bold; font-style: italic;"><a name="ds"></a>Important
note about asking on &lt;<span style="color: rgb(51, 51, 255);">ds</span>&gt;:</span><br>
<br>
Part of the reason this FAQ was
written is that<br>
people who ask questions on the
ds channel often do not<br>
realize that same question has
been asked many times<br>
before. If you ask something like
"how do I read the<br>
channel messages I missed?"
without first bothering to<br>
read this doc and others, you
just might get a response<br>
that's less friendly than you
might have expected.<br>
People on the channel really
want to help you,<br>
but if it seems like you're not
willing to put in the<br>
time to try to help yourself,
they might choose to <br>
ignore you until you gather some
clues on your own.<br>
<br>
Something else to remember is
that we are not<br>
on your mud and we don't see what
you see. "Why won't<br>
my workroom update?" lacks enough
information to let<br>
anyone try to help, but "when i
try to update my<br>
workroom I get &lt;error
message&gt;" might.<br>
<br>
Similarly, some things don't
have an answer<br>
that is suited to ds. "could
someone help me <br>
understand the score.c file?" or
"how do quests work?"<br>
have answers that are long and
complex, or are<br>
already covered in the
documentation available<br>
to you.<br>
<br>
Some stuff just doesn't have an
answer <br>
that can be explained to you
unless you already<br>
have the experience you'd need to
know the answer.<br>
for example:<br>
<br>
- <span style="font-style: italic;">How do I make a
stargate that has a dial for</span><br style="font-style: italic;">
<span style="font-style: italic;"> going to
different places?</span><br>
<br>
- <span style="font-style: italic;">How do I make it
so a player can be on different</span><br style="font-style: italic;">
<span style="font-style: italic;">planes of
existence, and what they see when they</span><br
 style="font-style: italic;">
<span style="font-style: italic;">look around
depends on what plane they're on?</span><br>
<br>
- <span style="font-style: italic;">How do I add limbs
so people can wear stuff</span><br style="font-style: italic;">
<span style="font-style: italic;">like kneepads
on the knee only?</span><br>
<br>
These three questions illustrate
things that are<br>
totally doable, but whose
explanation is so<br>
complex and full of judgment
calls that there <br>
is no way of satisfying the
question without<br>
making you magically understand
intermediate-level<br>
LPC coding. <br>
That doesn't mean they're bad
ideas, or<br>
even that hard to implement. It's
just that<br>
the questions can't be answered
until you read<br>
and understand the Creator's
Manual, and by that<br>
time, you'll know the answer on
your own.<br>
<br>
Make sure you've read the docs,
then ask<br>
the question in a way that makes
it clear you aren't<br>
just a lazy person who wants
other people to do her<br>
work, but rather a hardworking
builder who has<br>
tried to fix something and needs
a specific answer<br>
to a specific question that isn't
already in the<br>
FAQ's or the docs.<br>
<br>
Critiques are welcome, but they
should<br>
be constructive. "This combat
system is slow and<br>
stupid" is unhelpful and might be
taken as a<br>
hostile statement. Instead you
could phrase it <br>
in a way such as: "Combat is
slower than I <br>
expected. Why? I used to play on
LeetFooMud and it<br>
took less than a minute to kill
Tiamat." It's still<br>
a bit clueless, but it's a fair
question that can<br>
be answered on its own terms
without starting<br>
a flamestorm.<br>
<br>
Finally, some things are only
lightly<br>
documented, or perhaps not at
all. Filling out<br>
the documentation is an ongoing
project, but as<br>
with much freeware out there, you
have to be willing <br>
to put in a little bit of time to
experiment. For<br>
example, you may not know what
the "importance<br>
to the class" section in the
class file format is, <br>
and you may not find the answer
in the docs. In<br>
such a case, you have to be
willing to experiment a<br>
little, and plug in different
numbers, to see what<br>
they do. I can't hold your hand
every step of the<br>
way. You have to trust your own
intelligence and<br>
enjoy the sense of adventure in
discovering things<br>
on your own.<br>
<br>
Also, please refer to this <a
 href="http://dead-souls.net/ds-admin-faq.html#99">Admin FAQ section</a>
<br>
on how to ask questions in the most productive way.<br>
<br>
<br>
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="1.2"></a><span
 style="font-weight: bold; text-decoration: underline;">The
ds channel is too spammy. It's distracting me.</span><br>
<br>
Enable or disable a channel by
typing just its name. Like:<br>
<br>
<span style="font-weight: bold;">ds</span><br>
<br>
<br style="font-weight: bold; text-decoration: underline;">
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="1.3"></a><span
 style="font-weight: bold; text-decoration: underline;">All
I did was change one thing in a file, and now it won't update. Help!</span><br>
<br>
You should make it a habit to
make backup copies of files<br>
before editing them. That way, if
you screw up the code, you can<br>
just copy the backup to the
original filename.<br>
<br>
A convenient way to do this is
the <span style="font-weight: bold;">bk</span> command. See<br>
the <a href="http://dead-souls.net/debugging.html#5">debugging page</a>
for an example of its use.<br>
<br>
If your file is in the /tmp
directory, it won't update.<br>
The lib uses /tmp for temporary
system files, and as<br>
a result, it is a security
feature that files in /tmp can't<br>
be loaded into memory.<br>
<br>
If you are using Windows, you
need to be aware of the<br>
linefeed problem. unix text files
and DOS text files have different<br>
formatting. If you edit files in
Notepad, then try to update them,<br>
you may find that the file no
longer updates, no matter what<br>
you do. The difference is usually
invisible to you, so you can't<br>
tell why a file that looks
exactly the same as before now won't<br>
work.<br>
<br>
Dead Souls expects
unix-formatted text, and if you feed it<br>
something else, the results
aren't likely to be to your<br>
satisfaction. Make sure you use
an editor that respects unix<br>
text. In Windows 2000, WordPad
seems to do a reasonable job of not<br>
completely screwing things. It
does, however, add carriage<br>
returns to your lines, so when
you look at them in ed, you'll<br>
see a bunch of "<span style="font-weight: bold;">^M</span>"'s all over
the place.<br>
<br>
Take a look at the <a href="http://dead-souls.net/downloads.html#1">third
party downloads
page</a> for<br>
some suggestions as to what to
use instead of the default<br>
Windows editors.<br>
<span style="font-weight: bold;"></span><br>
If you still have trouble, take
a look at the <a href="http://dead-souls.net/debugging.html">debugging
page</a>.<br>
<br>
<span style="font-weight: bold;"></span><br>
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="1.4"></a><span
 style="font-weight: bold; text-decoration: underline;">The
mud editor is confusing the heck out of me. It's too hard to use.</span><br>
<br>
Check out the <a href="http://dead-souls.net/editor.html">MUD Editor
tutor</a><a href="http://dead-souls.net/editor.html">ial</a>. It should
ease the pain a little.<br>
<br>
If you're using a relatively recent version of Dead Souls, you<br>
can avoid some of the pain of the ed.c line editor by enabling "CreWeb".<br>
<br>
CreWeb is a web-based application that can run from the built-in<br>
Dead Souls webserver, allowing you to edit and upload files<br>
without having to mess with ed. For more information, type:<br>
<br>
<span style="font-weight: bold;">help creweb</span><br>
<br>
<br>
For screenshots:<br>
<br>
<a href="http://lpmuds.net/homedir.jpg">Your home directory</a><br>
<br>
<a href="http://lpmuds.net/editing.jpg">Editing a file</a><br>
<br>
<br>
<br>
<a name="1.5"></a><span
 style="font-weight: bold; text-decoration: underline;">When
I log in, everything is screwed up, and I can't do anything!</span><br>
<br>
This happens sometimes when you
log out while carrying an object<br>
with broken code. If for example,
you are wearing a vest, and then you<br>
edit the code for it, but it
doesn't work anymore, then you log out,<br>
what happens is the next time you
log in the mud will try to restore an<br>
item in your inventory that
throws an error, and your login<br>
gets stuck halfway.<br>
<br>
If you find that when you log in
things are all screwed up for<br>
you, use the rescue login
feature. For me, this means I would<br>
login as <span style="font-weight: bold;">cratylus_rescue</span>
instead of <span style="font-weight: bold;">cratylus</span>. My
inventory<br>
will get wiped before my
playerfile is loaded, and I'll<br>
be able to log in with no
problems.<br>
<br>
If this doesn't work, there's a
good chance that the room<br>
you're spawning in has a problem.
Try quitting and logging<br>
in again. If that works ok, then
it's very likely the<br>
room was at fault. See if there
are any messages in<br>
/log/runtime pointing to it.<br>
<br>
<br style="font-weight: bold; text-decoration: underline;">
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="1.6"></a><span
 style="font-weight: bold; text-decoration: underline;">Ok,
I'm a creator now. What am I supposed to do?</span><br>
<br>
Ask your admin.<br>
<br>
If you're like most other
creators, you have<br>
a creative vision you want to
implement and share with others.<br>
you want to create dragons, or
spaceships, perhaps dragons<br>
<span style="font-style: italic;">in</span> spaceships. This makes you
a
"builder".<br>
<br>
As a builder, your job is to
learn how your mud<br>
works so you can get your neat
ideas turned into a<br>
virtual reality. As you might
have guessed, nobody is<br>
going to jack into your brain and
upload coding ability<br>
into you. You need to learn how
to move around, how<br>
the creation system works, and
yes, you'll need at least<br>
some passing acquaintance with
the stuff your mud is<br>
made of: files written in the LPC
language format.<br>
<br>
The good news is that it's
nowhere near as hard<br>
to learn as C++. LPC is very
powerful, but it doesn't<br>
require you to be a master to get
simple things done.<br>
<br>
Your first steps as a new creator
probably should<br>
go something like this:<br>
<br>
<span style="font-weight: bold;">1)</span> Talk to your admin.
Understand what
is expected of<br>
you, and what the rules of your
mud are. <br>
<br style="font-weight: bold;">
<span style="font-weight: bold;">2)</span> Go to your workroom by
typing: <span style="font-weight: bold;">home</span>. Read the helpful
<br>
notes that are posted there for
you.<br>
<br>
<span style="font-weight: bold;">3)</span> Read the Player's Handbook,
cover to
cover. It isn't<br>
long, and you will need every bit
of information in there.<br>
<span style="font-weight: bold;">This is not a
suggestion. You need to read the handbook.</span><br>
<br>
<span style="font-weight: bold;">4)</span> Open the chest in your
workroom, and
play around <br>
with the tools and toys in there.
Having read the<br>
handbook will help you deal with
any issues you have<br>
handling these items.<br>
<br>
<span style="font-weight: bold;">5)</span> Type <span
 style="font-weight: bold;">wiz</span> to go to the Creator's Hall, and
if
there<br>
are any posts on the board, read
them. To read the<br>
first post: <span style="font-weight: bold;">read 1</span>. To read
the second, <span style="font-weight: bold;">read 2</span>, and so on.<br>
If you decide to write on the
board,<br>
remember that to exit "writing"
or "input" mode,<br>
you need to enter a dot on a line
all by itself,<br>
like this:<br>
<br>
<span style="font-weight: bold;">.</span><br>
<br>
<span style="font-weight: bold;">6)</span> Once you get a feel for how
to move
around, <br>
what playing here is like, and
how to do stuff, you<br>
can start exploring your creator
powers. To get<br>
a grasp of the very basics of
navigating through<br>
files and directories, type:<br>
<br>
<span style="font-weight: bold;">more
/doc/BASICS</span><br>
<br>
Yes, you must include capital
letters. Dead<br>
Souls distinguishes between upper
and lower case<br>
letters in filenames.<br>
<br>
To get a feel for what Dead Souls
LPC code looks like,<br>
wander about town and use the
about command to read<br>
code that compose the objects
there. For example:<br>
<br>
<span style="font-weight: bold;">goto
/domains/town/room/road<br>
<br style="font-weight: bold;">
about here</span><br style="font-weight: bold;">
<br style="font-weight: bold;">
<span style="font-weight: bold;">about beggar</span><br
 style="font-weight: bold;">
<br style="font-weight: bold;">
<span style="font-weight: bold;"></span> Or move around in your own home<br>
directory and check out the
defaults and templates<br>
there:<br>
<br>
<span style="font-weight: bold;">cd
/realms/&lt;yourname&gt;/area/npc</span><br style="font-weight: bold;">
<br style="font-weight: bold;">
<span style="font-weight: bold;">more fighter.c</span><br>
<br>
To bring a copy of that fighter
to life:<br>
<br>
<span style="font-weight: bold;">clone fighter</span><br>
<br>
To make him dance:<br>
<br>
<span style="font-weight: bold;">force fighter
to dance</span><br>
<br>
To kill him:<br>
<br>
<span style="font-weight: bold;">zap fighter</span><br>
<br>
To get rid of his corpse:<br>
<br>
<span style="font-weight: bold;">dest corpse</span><br>
<br>
<span style="font-weight: bold;">7)</span> Once you're done having fun
with your
godlike<br>
powers, it's time to start
learning how to make<br>
fun stuff of your own.<br>
<br>
For a quick start in building,
you<br>
can start reading the Creator's
Manual at<br>
chapter 31, which is where the
QCS section begins:<br>
<br>
<span style="font-weight: bold;">read chapter
31 in manual</span><br style="font-weight: bold;">
<br style="font-weight: bold;">
<span style="font-weight: bold;">read chapter
32 in manual</span><br>
<br>
and so on.<br>
<br>
That's fine to start with, but
eventually<br>
you'll need to read the whole
Creator's Manual.<br>
If you don't, 90% of the
questions you ask about<br>
code could be fairly answered
with: "read the manual."<br>
<br>
<br style="font-weight: bold; text-decoration: underline;">
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="1.7"></a><span
 style="font-weight: bold; text-decoration: underline;">This
is weird...where is the online builder? How does</span><br
 style="font-weight: bold; text-decoration: underline;">
<span style="font-weight: bold; text-decoration: underline;">new
stuff get compiled?</span><br>
<br>
Dead Souls can be very strange
to people used <br>
to non-LPC muds. This is because
many other kinds of<br>
muds use a system where the mud
is written in C++,<br>
and to make changes, you need to
add C++ code to the<br>
source, recompile it, then reboot
the mud.<br>
In that kind of system, building
is done with<br>
tools where you fill in blanks
and code is generated<br>
for you. I presume that some C++
expertise is <br>
required for doing anything
unusual or fancy.<br>
<br>
If you come from this kind of
environment,<br>
you may be in for a little
disorientation. On a Dead<br>
Souls mud, there is no need for
compiling code. You<br>
don't need to reboot the mud for
new stuff to<br>
be available.<br>
<br>
You can add your new Orc God of
War to the<br>
game (after you code him, of
course) with two <br>
simple commands:<br>
<br>
<span style="font-weight: bold;">update
/realms/&lt;you&gt;/area/npc/grimmash.c</span><br
 style="font-weight: bold;">
<br style="font-weight: bold;">
<span style="font-weight: bold;">clone
/realms/&lt;you&gt;/area/npc/grimmash.c</span><br>
<br>
You're now face to face with
him. This makes<br>
Dead Souls, like most LPC muds,
very flexible in<br>
what can be done, and very stable
in terms of<br>
needing few reboots. Reboots
typically are<br>
necessary only when someone
breaks important<br>
code, or to implement major
mud-wide changes.<br>
<br>
So, just write your code, and
update it.<br>
It's that simple. There are two
main ways to do<br>
this. The easiest way is with the
QCS, or quick<br>
creation system. With the QCS,
you don't even need<br>
to look at code. You just issue a
few commands,<br>
and your new whatever is there. <a href="example.html">Check out an
example<br>
of the QCS here.</a><br>
<br>
To learn the QCS, read the
Creator's <br>
Manual starting on chapter 31.<br>
<br>
The other way to create on-line
is<br>
with the ed command. The ed
editor is a powerful<br>
and flexible way of editing
files. Some people<br>
find it difficult at first, and
you might even<br>
be able to avoid it for a while
if you mostly<br>
just use QCS. However, you'll
eventually need to<br>
know a little about ed. <a href="editor.html">For a tutorial, go
here</a>.<br>
<br>
For more detailed documentation,
<br>
type: <span style="font-weight: bold;">help ed</span><br>
<br>
<br>
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="1.8"></a><span
 style="font-weight: bold; text-decoration: underline;">I
explored around in /domains/Ylsrim and &lt;XYZ&gt; is broken</span><br>
<br>
Ylsrim is kept in the
distribution as a kind of<br>
sentimental artifact. It's the
demo area that the<br>
original Dead Souls shipped with,
and although<br>
it's mostly been fixed up to work
with Dead Souls 2,<br>
things can behave unexpectedly.
There will be<br>
no new fixes to Ylsrim. Please
consider it a museum<br>
exhibit that stands as-is. This
is also true for Praxis.<br>
<br>
<br>
<a name="1.9"></a><span
 style="font-weight: bold; text-decoration: underline;">I
explored around in /domains/town and &lt;XYZ&gt; is broken</span><br>
<br>
Please send me an email and let
me know, so I <br>
can fix it. Also let me know if
something in the default,<br>
campus, or examples domain is
hosed up.<br>
<br>
<br>
<a name="1.10"></a><span
 style="font-weight: bold; text-decoration: underline;">What
are the known bugs and problems in Dead Souls?</span><br>
<br>
Please see the <a href="http://dead-souls.net/issues.html">Known
Issues page</a>.<br>
<br>
<br>
<span style="font-weight: bold; text-decoration: underline;"><a
 name="1.11"></a>Why do you keep asking me to post my code?</span><br>
<br>
Sometimes, when someone asks for help on the intermud<br>
channels, I will ask them to post their broken file on<br>
<a href="http://lpmuds.net/forum/">http://lpmuds.net/forum/</a> to
troubleshoot.<br>
<br>
Let me make a few things clear:<br>
<br>
- I am not trying to steal your broken newbie code.<br>
- I am not trying to drive up web site traffic.<br>
- I am not trying to collect your personal data.<br>
<br>
I've actually had more than one person get hostile<br>
and defiant about posting on the forum, which I<br>
find mind-boggling considering they were asking for help<br>
in the first place.<br>
<br>
The reason I ask is that, as good as I am with Dead<br>
Souls and LPC, some things I can't figure out unless<br>
I see:<br>
<br>
1) The errors generated by the code.<br>
2) The code that generates the error.<br>
<br>
If I ask to see your file and you won't post it on the<br>
forum, I might maybe accept it by email. On the other hand,<br>
the point of the forum is for people to learn from each<br>
other, including each other's mistakes. If you won't<br>
allow your troubled code to be made public so<br>
people can help you, I'll probably let you work it out<br>
on your own. <br>
<br>
Remember that I release 99% of my code for the<br>
whole world to see, so I've got limited patience if you're<br>
going to hoard your precious uber sword of wounding code.<br>
<br>
<br>
</big><big style="font-family: courier new;"><span
 style="font-weight: bold; text-decoration: underline;"><a name="1.12"></a>"help
modify" breaks.</span><br>
<br>
This is typically the result of your columns screen <br>
setting being very large. Type:<br>
<br>
<span style="font-weight: bold;">screen 80 24</span><br>
<br>
This is fixed in Dead Souls 2.5a18 and above.<br>
<br>
<br>
<span style="font-weight: bold; text-decoration: underline;"><a
 name="1.13"></a>There are no help files!</span><br>
<br>
You probably downloaded the public domain version of <br>
Dead Souls. This version is not recommended for newcomers<br>
to Dead Souls...it is really for experts or for people<br>
who have special needs like developing their own lib<br>
or selling their software. For normal people who are just<br>
interested in running a mud, the regular version is<br>
the right choice. <a href="http://dead-souls.net/ds-inst-faq.html#2">Download
and install the regular<br>
distribution</a>, instead.<br>
<br>
<br style="font-weight: bold; text-decoration: underline;">
<span style="font-weight: bold; text-decoration: underline;"><a
 name="1.14"></a>Where are the help files for skills and stats?</span><br>
<br>
Things like "strength" or "intelligence" or "knife<br>
defense" are stats and skills that are used by the<br>
mud in calculating things like combat effectiveness.<br>
<br>
For the most part, they are self-explanatory..."strength"<br>
is how strong you are, "magic attack" is how good you are<br>
at, say, hurling fireballs.<br>
<br>
For the most part these are not documented in the help<br>
system because their use should be self-explanatory<br>
and may not even exist from mud to mud. Please see the<br>
other faq articles for more details:<br>
<br>
<a href="http://dead-souls.net/ds-creator-faq.html#2.16">http://dead-souls.net/ds-creator-faq.html#2.16</a><br>
<a href="http://dead-souls.net/ds-creator-faq.html#2.56">http://dead-souls.net/ds-creator-faq.html#2.56</a><br>
<a href="http://dead-souls.net/ds-admin-faq.html#115">http://dead-souls.net/ds-admin-faq.html#115</a><br>
<br>
Often what querents mean when they ask this question <br>
is "exactly how does strength and knife attack interact<br>
in the combat system with the opponent's dexterity,<br>
armor and knife defense?"<br>
<br>
The only answer to this question that I can give and<br>
retain my sanity is "You're going to have to get familiar<br>
with the lib, test different weapons and skill/stat<br>
levels, and see for yourself."<br>
<br>
<br>
<br>
<br>
</big><big style="font-family: courier new;"><br>
</big>
<hr
 style="width: 100%; height: 2px; font-weight: bold; font-family: courier new;"><big
 style="font-family: courier new;">Section 2: Code<br>
<br>
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="2.1"></a><span
 style="font-weight: bold; text-decoration: underline;">What's
the QCS?</span><br>
<br>
Please see the <a href="example.html">QCS example page</a> for an
explanation of this<br>
important Dead Souls system.<br>
<br>
<br>
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="2.2"></a><span
 style="font-weight: bold; text-decoration: underline;">SetUnique
doesn't work.</span><br>
<br>
SetUnique() is probably doing
something you<br>
don't expect. When an item is
loaded into memory, and<br>
it has an inventory, it first
checks each of those items<br>
for whether it's supposed to be
unique.<br>
If it is supposed to be unique,
then we look<br>
through the list of loaded
objects to see if there is<br>
one of these items already
cloned. If there is, then<br>
we don't clone a new one.<br>
What this means is that if I
kidnap Leo the<br>
archwizard and hold him in my
workroom, another one will<br>
not appear in the basement until
my Leo is dested.<br>
<br>
Note, however, that this does
NOT mean that the<br>
mud will never have two Leos. I
can clone however many<br>
Leos I want. But as long as one
or more cloned Leos<br>
exist, the basement will not make
another. That's<br>
what SetUnique means.<br>
<br>
Putting a negative number in the
value element<br>
of a given item in SetInventory
makes it get treated as a <br>
unique object.<br>
<br>
Now, if the behavior you're
seeing is different<br>
from what I described, maybe
SetUnique <span style="font-style: italic;">is</span> broken,<br>
and you should email me with what
you're seeing.<br>
<br>
<br style="text-decoration: underline; font-weight: bold;">
<span style="text-decoration: underline; font-weight: bold;"></span><a
 name="2.3"></a><span
 style="text-decoration: underline; font-weight: bold;">I
made a magic wand that disappears after 10 minutes.</span><br
 style="text-decoration: underline; font-weight: bold;">
<span style="text-decoration: underline; font-weight: bold;">But
if a player logs out and log back in, they have</span><br
 style="text-decoration: underline; font-weight: bold;">
<span style="text-decoration: underline; font-weight: bold;">another
10 minutes! How do I fix this?</span><br>
<br>
What's happening is that you are
keeping<br>
track of how old the wand is,
perhaps with a<br>
variable named Age. But if the
player quits and<br>
logs back in, then the wand gets
cloned again, resetting<br>
all its values, including Age, to
the original.<br>
<br>
The way to make the Age variable
survive<br>
logouts is with AddSave. If you
give your variable to<br>
AddSave as an argument, that
variable gets saved when<br>
the user quits, and when they log
back in, it is restored,<br>
preventing cheating.<br>
<br>
See /obj/wed_ring.c for an
example.<br>
<br>
<br style="text-decoration: underline; font-weight: bold;">
<span style="text-decoration: underline; font-weight: bold;"></span><a
 name="2.4"></a><span
 style="text-decoration: underline; font-weight: bold;">Where
is it saved?</span><br
 style="text-decoration: underline; font-weight: bold;">
<br>
In the player's playerfile, along
with the values of all<br>
the objects they were carrying
when they quit. The file is<br>
in /secure/save/[ players |
creators ]/&lt;first initial&gt;/&lt;name&gt;.o<br>
<br>
Note that AddSave() is not responsible for the act of<br>
saving data to the playerfile. AddSave() sets in the object<br>
which variables should be saved. When the player quits<br>
or the automatic save time is reached (about every 5 minutes),<br>
the save_player() lfun in LIB_AUTOSAVE checks each carried <br>
object for its AddSaves(), and saves that data in the<br>
player object accordingly.<br>
<br>
<br style="font-weight: bold; text-decoration: underline;">
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="2.5"></a><span
 style="font-weight: bold; text-decoration: underline;">How
do I add or remove emotes?</span><br>
<br>
That is an admin job. You admin
would use the<br>
<span style="font-weight: bold;">addemote</span> or <span
 style="font-weight: bold;">removeemote</span> commands.<br>
<br>
<br style="font-weight: bold; text-decoration: underline;">
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="2.6"></a><span
 style="font-weight: bold; text-decoration: underline;">How
can I tell what files something inherits?</span><br
 style="font-weight: bold; text-decoration: underline;">
<br>
Use the showtree command. To know
what files<br>
are inherited by your robe, for
example:<br>
<br>
<span style="font-weight: bold;">showtree
/domains/default/armor/robe<br>
<br>
</span><br style="font-weight: bold; text-decoration: underline;">
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="2.7"></a><span
 style="font-weight: bold; text-decoration: underline;">How
can I find the filename of something?</span><br>
<br>
If it's in your environment: <span style="font-weight: bold;">scan here</span><br>
If it's in your possession: <span style="font-weight: bold;">scan me</span><br>
<br>
The number sign (#) and numbers
at the end are that <br>
object's unique identifier.<br>
<br>
<br>
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="2.8"></a><span
 style="font-weight: bold; text-decoration: underline;">What's
the largest integer usable by the mud?</span><br>
<br>
On a 32-bit compiled driver: 2147483647 (Two point one billion)<br>
On a 64-bit compiled driver: 9223372036854775807 (Nine point two
quintillion) <br>
<br>
To know which you're on, type: <span style="font-weight: bold;">eval
return MAX_INT</span><br>
<br>
<br>
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="2.9"></a><span
 style="font-weight: bold; text-decoration: underline;">How
can I find out what functions exist in something?</span><br>
<br>
Get its filename and use the
functions efun. For example:<br>
<br style="font-weight: bold;">
<span style="font-weight: bold;">eval return
functions(load_object("/domains/town/obj/sign"))</span><br>
<br>
<br>
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="2.10"></a><span
 style="font-weight: bold; text-decoration: underline;">object::init()
is broken!</span><br>
<br>
It isn't really. Unless you're
coding a lib<br>
item, you should not be
inheriting LIB_OBJECT for<br>
"tangible things" anyway. You
should inherit LIB_ITEM.<br>
<br>
The reason object::init() fails
is that LIB_OBJECT<br>
doesn't have an init() function
to call.<br>
<br>
<br>
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="2.11"></a><span
 style="font-weight: bold; text-decoration: underline;">if(ob-&gt;GetFoo())
seems to break, but I don't know why</span><br>
<br>
This function will error if ob
does not exist. Unless<br>
you are 100% positive ob will
exist (and really, even if so),<br>
it should look like this:<br>
<br>
<span style="font-weight: bold;">if(ob
&amp;&amp; ob-&gt;GetFoo())<br>
<br>
</span> Which means "if ob
exists, and it has a foo".<br>
This way, if there is no ob, the
check stops right there<br>
without getting hosed up on the
next step.<br>
<br>
<br>
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="2.12"></a><span
 style="font-weight: bold; text-decoration: underline;">How
do I add color to my descriptions?</span><br>
<br>
There are various markup tokens
you can use for this. They look like this:<br>
<br>
write("%^BOLD%^GREEN%^ <span
 style="color: rgb(0, 102, 0); font-weight: bold;">This
text would be in bold green letters</span> %^RESET%^ and this would
not.");<br>
<br>
To make text blink, use this tag:
%^FLASH%^<br>
<br>
The %^RESET% is important.
Without it, unpredictable things can happen.<br>
<br>
To know what colors are
available, type: <span style="font-weight: bold;">colors</span><br>
<br>
You should probably avoid color
unless there is a compelling <br>
reason for its use. Many mud
admins discourage it because it can <br>
distract from the game and cause
uniformity issues: most mud <br>
admins feel their mud text should
look more or less<br>
the same everywhere.<br>
<br>
<br>
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="2.13"></a><span
 style="font-weight: bold; text-decoration: underline;">How
do I turn the integer 42 into the string "forty-two"?</span><br>
<br>
cardinal(42)<br>
<br>
<br>
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="2.14"></a><span
 style="font-weight: bold; text-decoration: underline;">Can
I use !=NULL as a test?</span><br>
<br>
In theory, I guess so, but I
doubt it'll work by default, and I'd<br>
discourage you from doing
anything so non-LPC-standard. <br>
Instead try something like one of
the following:<br>
<br>
if(variable)<br>
if(sizeof(variable))<br>
if(variable != "")<br>
<br>
<br>
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="2.15"></a><span
 style="font-weight: bold; text-decoration: underline;">I
want to create and test a new command for the mud,</span><br
 style="font-weight: bold; text-decoration: underline;">
<span style="font-weight: bold; text-decoration: underline;">but
I'm not admin so I can't put anything in the</span><br
 style="font-weight: bold; text-decoration: underline;">
<span style="font-weight: bold; text-decoration: underline;">normal
command paths. What can I do?</span><br>
<br>
Put your new command in your
homedir's cmd/<br>
subdirectory. A sample command is
there already<br>
to serve as a template. When you
add a command, type:<br>
<br>
<span style="font-weight: bold;">update
/daemon/command</span><br>
<br>
for it to show up in your path.<br>
<br>
<br>
<span style="text-decoration: underline; font-weight: bold;"></span><a
 name="2.16"></a><span
 style="text-decoration: underline; font-weight: bold;">How
do skills work?</span><br>
<br>
Skills are generally class-based,
meaning that they are <br>
specified in the class files
found in /secure/cfg/classes.<br>
Skills are only meaningful in
terms of library objects that<br>
understand them.<br>
<br>
For example, a fighter's blade
attack is useful because<br>
player.c and combat.c make use of
this skill as a<br>
modifier.<br>
<br>
But adding a basketweaving skill
to a class is not<br>
helpful unless there are library
objects (looms, perhaps,<br>
or straw) and verbs (weaving,
maybe?) that make<br>
use of that skill.<br>
<br>
There are also race-based skills,
such<br>
as poison bite or breath attack.
These skills are<br>
specified in /secure/cfg/races.<br>
<br>
<br>
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="2.17"></a><span
 style="font-weight: bold; text-decoration: underline;">How
do classes work?</span><br>
<br>
Basically, having a class gives
you special skills.<br>
That's it. See the above section,
"How do skills work?"<br>
<br>
<br style="font-weight: bold; text-decoration: underline;">
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="2.18"></a><span
 style="font-weight: bold; text-decoration: underline;">How
do virtual rooms work?</span><br>
<br>
Virtual rooms are rooms generated
on the fly by a<br>
virtual room server. You program
that server with<br>
the room descriptions, the number
of them, <br>
etc, and the virtual server can
make available<br>
a grid of rooms with your
descriptions.<br>
<br>
This allows you to create, for
example,<br>
a vast desert, or a large jungle,
comprised of<br>
dozens, or hundreds, or thousands
of rooms<br>
without having to manually code
each and every<br>
single room.<br>
<br>
For an example, take a look at<br>
<br>
/domains/town/virtual/<br>
<br>
<br>
<a name="2.19"></a><span
 style="font-weight: bold; text-decoration: underline;">How
are files organized in Dead Souls?</span><br>
<br>
<br>
See the <a href="ds-admin-faq.html">admin FAQ</a>.<br>
<br>
<br>
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="2.20"></a><span
 style="font-weight: bold; text-decoration: underline;">What
are applies, lfuns, sefuns and efuns?</span><br>
<br>
<br>
Sefuns and efuns are functions
available to all objects on the<br>
mud. Any object may need to know
what time() it is, so rather<br>
than have a time() function in
every file that needs it, which<br>
could be many, there is a time()
function built into the<br>
game that any object can use. An
efun is built into the<br>
driver, so there is no LPC code
to look at. A sefun is a<br>
simulated efun, coded in LPC.
Sefuns are kept in /secure/sefun.<br>
<br>
Lfuns are functions specific to
library objects. A shirt,<br>
for example, has functions that a
sword may not need, so<br>
the LIB_ARMOR and LIB_WEAPON
files contain their own functions,<br>
not shared by other files (it's
more complicated than this,<br>
but that's the idea). These
functions are library<br>
functions, or lfuns. Typically
they are found in the objects<br>
defined by the files in /lib.<br>
<br>
<a name="applies"></a>An apply is a function that is called by the
driver. Some<br>
examples of applies are create() and reset(). Although you<br>
can call many applies normally from within the mud, the<br>
point of them is to have some common functions known to the<br>
driver that it can call on objects. In the case of create(),<br>
it is a function that the driver calls on any new object<br>
loaded into memory (like main() in a C program). Many applies<br>
are security oriented, and are called only in the master object,<br>
such as valid_read() or valid_socket(). This is a way for the<br>
driver to be assured that a trusted security object knows<br>
it's ok to perform the pending "sensitive" operation.<br>
<br>
For a lot more detail on efuns
and sefuns, see the <a href="ds-admin-faq.html">admin FAQ</a>.<br>
<br>
<br>
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="2.21"></a><span
 style="font-weight: bold; text-decoration: underline;">Why
are there more sefun doc files than sefun files?</span><br>
<br>
Sefun files, like
/secure/sefun/strings.c, often contain<br>
more than just one sefun.
Therefore, there will be more<br>
files documenting individual
functions than there are<br>
files containing sefuns.<br>
<br>
<br>
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="2.22"></a><span
 style="font-weight: bold; text-decoration: underline;">I
edited a file but now the reload command is complaining.</span><br>
<br>
There are two commonly used
commands for loading<br>
objects: update and reload.<br>
<br>
When you want to load a file into
memory, you use<br>
update, for example: <span style="font-weight: bold;">update
/domains/default/room/road</span><br>
<br>
When you want to replace a cloned
object with a<br>
version that uses the latest code
in a file, you<br>
use reload, for example: <span style="font-weight: bold;">reload my
first red
sword</span><br>
<br>
reload doesn't work on files.<br>
<br>
update doesn't work on cloned
objects.<br>
<br>
The reason there are two
commands, instead of one all-purpose<br>
one, is both historical and
functional. The reason "reload"<br>
exists is that I got sick of
having to dest a thing, update<br>
its file, then clone the thing
every time I wanted to<br>
test changes in its code. This
was annoyingly tedious, so I<br>
coded the reload() sefun and
reload command.<br>
<br>
However, update works just fine,
and I wasn't about<br>
to try to fix something that
wasn't broken. It works, and<br>
LPC old timers are used to it.<br>
<br>
Further, it has a function
sufficiently separate from <br>
reload that it stands as a
command on its own merits.<br>
<br>
<br>
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="2.23"></a><span
 style="font-weight: bold; text-decoration: underline;">this_player()-&gt;GetName()
returns "A shadow" when the player is invis.</span><br>
<br>
Use
this_player()-&gt;GetKeyName() instead.<br>
<br style="font-weight: bold; text-decoration: underline;">
<br style="font-weight: bold; text-decoration: underline;">
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="2.24"></a><span
 style="font-weight: bold; text-decoration: underline;">Is
there a sefun for making a whole string uppercase?</span><br>
<br>
upper_case("omgwtfroflmao")<br>
<br>
<br>
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="2.25"></a><span
 style="font-weight: bold; text-decoration: underline;">What
is the difference between filter() and foreach()? How do I use them?</span><br>
<br>
Both of these efuns can act on
the individual members of an array. <br>
<br>
For example, if you wanted to
have an array named mystuff which<br>
contains the base filenames of
all objects in your inventory that<br>
inherit LIB_ARMOR:<br>
<br>
using filter:<br>
<br>
<span style="color: rgb(0, 0, 153);">string
*mystuff = ({}); <span style="color: rgb(0, 0, 0);">//This has to be a
global var</span></span><br style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);">object
*stuff = filter(filter(deep_inventory(this_player()), <br>
(: inherits(LIB_ARMOR,$1) :) ), (: mystuff += ({ base_name($1) }) :) );<br>
</span><br style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);"></span>using foreach:<br>
<br>
<span style="color: rgb(0, 0, 153);">string
*mystuff = ({});</span><br style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);">foreach(
object ob in deep_inventory(this_player())){</span><br
 style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);">if(
inherits(LIB_ARMOR, ob) ) mystuff += ({ base_name(ob)});</span><br
 style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);">}</span><br>
<br>
There are arguments favoring the
use of either. I won't get into <br>
it. As far as I can tell, it's
really a question of preference. <br>
You can structure these
functions more elegantly<br>
than shown here, to best suit
you. But this is the idea.<br>
<br>
<br>
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="2.26"></a><span
 style="font-weight: bold; text-decoration: underline;">member_array()
is returning exactly the wrong thing</span><br>
<br>
It probably isn't. member_array()
seems somewhat counterintuitive<br>
at first, because it often
returns a 0 as a "hit".<br>
<br>
What this function is doing is
checking to see whether the<br>
first argument is a member of the
array specified in the second<br>
argument, and then tells you
*which* element it is. for example:<br>
<br>
<span style="color: rgb(0, 0, 153);">member_array(
"bar", ({ "foo", "bar", "baz" }) ) <span style="color: rgb(0, 0, 0);">returns:
1</span></span><br style="color: rgb(0, 0, 153);">
<br style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);">member_array(
"foo", ({ "foo", "bar", "baz" }) ) <span style="color: rgb(0, 0, 0);">returns:
0</span></span><br>
<br>
Why does it return 0? Because
"foo" is element 0 of the<br>
array. If this_array == ({ "foo",
"bar", "baz" }), then<br>
this_array[0] is "foo". So
member_array("foo", this_array)<br>
would return 0.<br>
<br>
If the first argument is not a
member of the array, member<br>
array returns -1. So that:<br>
<br>
<span style="color: rgb(0, 0, 153);">member_array(
"shiz", ({ "foo", "bar", "baz" }) )</span> returns: -1<br>
<br>
<br>
Example:<br>
<br>
Does this player know how to
polka? Return 1 for yes:<br>
<br>
RIGHT: <span style="color: rgb(0, 0, 153);">if(member_array("polka
dancing", this_player()-&gt;GetSkills()) != -1) return 1;</span><br>
<br>
WRONG: <span style="color: rgb(0, 0, 153);">if(member_array("polka
dancing", this_player()-&gt;GetSkills()) ) return 1;</span><br>
&nbsp;<br>
The first way says "If 'polka
dancing' has an element number that isn't -1,<br>
then it is a member, so let's
return 1"<br>
<br>
The second way says "If 'polka
dancing' has an element number that isn't 0,<br>
then it is a member, so let's
return 1"<br>
<br>
The problem with the second way
is that it is possible for "polka dancing"<br>
to be element 0 in that array,
and if it is, your code will incorrectly<br>
tell you that you can't polka
dance. But worse than this is that if<br>
you actually can't polka dance,
this second way will incorrectly tell<br>
you that you can. Given random
input, the second way would be wrong more than<br>
half the time.<br>
<br>
<br>
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="2.27"></a><span
 style="font-weight: bold; text-decoration: underline;">I'm
trying to add two mappings together and the results are bizarre</span><br>
<br>
Adding mappings together has to
be done just so in order for<br>
it to work the way one might
expect. What can happen in <br>
mapping arithmetic is that in the
process of trying to<br>
add the values of one mapping to
another, you can change the<br>
values of a mapping you didn't
intend to. The deal is a<br>
conflict between passing data by
reference or by value. To<br>
be sure that you don't
accidentally modify an innocent<br>
bystander, use the add_maps()
sefun. For example:<br>
<br>
MyMap = add_maps(HisMap, HerMap);<br>
<br>
or<br>
<br>
MyMap = add_maps(MyMap, HerMap);<br>
<br>
<br>
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="2.28"></a><span
 style="font-weight: bold; text-decoration: underline;">When
str = "abc", str[1] is 98, not "b". What gives?</span><br>
<br>
What you're getting here is the
ASCII code of element 1.<br>
If you have to have that element
as a string, use the<br>
convert_ascii() sefun, like this:<br>
<br>
convert_ascii(str[1])<br>
<br>
You can instead use ranges, so
that:<br>
<br>
str[0..0] == "a"<br>
str[1..1] == "b"<br>
str[1..2] == "bc"<br>
<br>
If you use ranges, do not use the
convert_ascii() sefun.<br>
<br>
<br style="font-weight: bold; text-decoration: underline;">
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="2.29"></a><span
 style="font-weight: bold; text-decoration: underline;">How
do I make an array1 that is the same as array2 but without an element?</span><br>
<br>
Two ways:<br>
<br>
1) array1 = array2 - ({ element
});<br>
<br>
2) array1 = filter(array2, (: $1
!= element :) );<br>
<br>
<br>
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="2.30"></a><span
 style="font-weight: bold; text-decoration: underline;">How
do I pass arguments to a pointer in a functional?</span><br>
<br>
With commas, like this:<br>
<br>
(: eventKill, player :)<br>
<br>
Your arguments will likely need
to be constants, tokens, and/or global variables.<br>
<br>
<br style="color: rgb(204, 0, 0);">
<span style="font-weight: bold; color: rgb(204, 0, 0);"></span><span
 style="font-weight: bold; text-decoration: underline;"></span><a
 name="2.31"></a><span
 style="font-weight: bold; text-decoration: underline;">What
does the tc() sefun do?</span><br>
<br>
It's something I coded for myself
long ago, basically<br>
a personalized debug(). However,
people have been <br>
asking for that functionality for
themselves, so<br>
the debug() sefun now carries
this functionality. For<br>
more information, type:<br>
<br>
<span style="font-weight: bold;">man debug</span><br>
<br>
<br style="font-weight: bold; text-decoration: underline;">
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="2.32"></a><span
 style="font-weight: bold; text-decoration: underline;">How
can I find out how many items are in an array quickly?</span><br>
<br>
sizeof(array)<br>
<br>
<br>
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="2.33"></a><span
 style="font-weight: bold; text-decoration: underline;">My
SetRead isn't working<br>
<br>
</span>You may need an item for
each read. For example,<br>
SetRead( ([ ({"alpha", "bravo",
"charlie"}) : "Delta.", ]) )<br>
<br>
May need something like this <span style="font-weight: bold;">*above*</span>
it:<br>
<br>
SetItems( ([ ({"alpha", "bravo",
"charlie"}) : "A thing you can read.", ]) )<br>
<br>
<br>
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="2.34"></a><span
 style="font-weight: bold; text-decoration: underline;">My
SetEnters/SetSmells/SetListens isn't working</span><br>
<br>
See above.<br>
<br>
<br style="font-weight: bold; text-decoration: underline;">
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="2.35"></a><span
 style="font-weight: bold; text-decoration: underline;">Can
I nest loops?</span><br>
<br>
Can you? Probably. Should you?
Usually not.<br>
For loops and while loops are
legal LPC, and you may even<br>
see them here or there in older
lib code. But they<br>
should be avoided because they
generate much more<br>
lag than the more efficient
foreach() and filter() efuns.<br>
<br>
<br style="font-weight: bold; text-decoration: underline;">
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="2.36"></a><span
 style="font-weight: bold; text-decoration: underline;">What
should I do or not do in my code?</span><br>
<br>
1) Avoid using call_out() as much
as humanly possible.<br>
Use heart_beat() to time things
instead.<br>
<br>
2) Don't code stuff that
replicates itself. <br>
<br>
3) Don't code stuff that
circumvents security. For<br>
example, knowing that an admin is
logged on but<br>
invisible isn't much help to you
if he bans you<br>
for coding a tool to find him.<br>
<br>
4) foreach() and filter() are
faster than for() loops,<br>
and harder to screw up.<br>
<br>
5) switch() is faster and more
economical than if()<br>
for multiple evaluations.<br>
<br>
6) Don't use callouts.<br>
<br>
7) Don't use add_action for
something that already<br>
has a verb. There is no point in
making an add_action<br>
for "throw", for example. It's
just going to confuse<br>
players when your "throw" doesn't
behave the way<br>
"throw" does everywhere else on
the mud.<br>
<br>
8) Callouts are bad, mkay?<br>
<br>
9) Don't code delays by using
loops. This affects the<br>
whole mud. If an action is to be
delayed, use heart_beat().<br>
<br>
<br style="font-weight: bold; text-decoration: underline;">
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="2.37"></a><span
 style="font-weight: bold; text-decoration: underline;">How
much different or heavily modified is Dead Souls than stock LPC?</span><br>
<br>
This is a difficult question to
answer on its own terms. It's<br>
roughly equivalent to: <br>
<br>
Is Fedora different from stock
UNIX, or will my Solaris programs work on it?<br>
<br>
This DVD movie is in NTSC format,
so my TV can handle it, right?<br>
<br>
The terms used roughly
correspond to the same<br>
general thing, but the assumption
here is that there is a<br>
"stock" LPC, and you can
transplant code from one LP mud to <br>
another. <br>
Sometimes these transplants can
be done. Oftentimes not.<br>
This is because LPC has been
interpreted and implemented in<br>
many slightly different ways by
many slightly different versions<br>
of many different drivers. The
end product of the DVD is a movie<br>
playing on your TV, but how it
gets there is very different from<br>
how a videocassette does it, even
if it's the same movie and its<br>
signal is encoded in NTSC in both
cases.<br>
<br>
If you have two LPmuds that use
different drivers, it<br>
can be much like the difference
between a DVD and a videotape.<br>
Sometimes, if the drivers are
related, the difference is smaller,<br>
like VHS versus Betamax, but
you'll still be embarking on a<br>
major project getting the movies
from one to play on the other.<br>
<br>
The result is that a coder from
Discworld and a coder<br>
from Nightmare can roughly speak
the same language, and discuss<br>
solutions to their problems that
make sense. And each coder<br>
could probably visit the other
mud and work with a very<br>
small learning curve.<br>
But the code itself would
probably require substantial<br>
retooling to be interchanged.<br>
<br>
<br>
<a name="2.38"></a><span
 style="font-weight: bold; text-decoration: underline;">Is
there a way to change the "default exit" room messages?</span><br>
<br>
A lot of folks don't like having
default exits displayed at the<br>
top. The muds they're used to display them at the bottom of the room<br>
descriptions, and that's how they want their DS mud to look.<br>
<br>
In Dead Souls 2.4.1 this is no longer the default behavior.<br>
Now obvious exits are displayed at the bottom, in a <br>
more "natural" style closer to the way LPmuds have historically<br>
done it.<br>
<br>
Your admin&nbsp; can switch between this new way and the old way with<br>
the command:<br>
<br>
<span style="font-weight: bold;">mudconfig nmexits</span> [ <span
 style="font-weight: bold;">yes</span> | <span
 style="font-weight: bold;">no</span> ]<br>
<br>
<br>
<a name="2.39"></a><span
 style="font-weight: bold; text-decoration: underline;">This
dummy item is weird.</span><br>
<br>
Dummy items *are* weird. They
exist because the<br>
parsing system requires objects
to act on. When you "<span style="font-weight: bold;">look</span><br
 style="font-weight: bold;">
<span style="font-weight: bold;">at painting</span>", the parser
doesn't take "painting"
as a<br>
string to match. Through a
magical mystical process<br>
deep in the MudOS driver, the
parser turns "painting" into<br>
an object to act on.<br>
It tries to find object in the
area that match<br>
this keyword, and if it finds
one, it sends that object<br>
a query about whether it can be
looked at. Depending <br>
on the response, the parser
continues on to determine<br>
what the verb (the command you
issued) thinks should<br>
happen to objects that can be
looked at, and tries to <br>
evaluate that event with the
object as its target. The<br>
process continues in a complex
dance of "may I?<br>
how so?" etc, until finally the
painting, the verb, the<br>
parser, and you come to an
agreement as to what the<br>
result of this looking should be.<br>
Crucial to this process is that
the painting<br>
actually *exist* as an object, so
it can be queried <br>
for various functions. Without a
"painting object" in<br>
the room, there's no parsing
that's going to <br>
happen with it.<br>
But what if this painting is
just part of the<br>
room description? You don't want
to add a painting<br>
to the inventory of a room just
so people can look<br>
at it. You want people to be able
to "look at painting",<br>
or "look at wall", or "look at
ceiling" without<br>
having to have all of these items
be part of the<br>
room's inventory. What a chore
that would be!<br>
This is where dummy items come
in. They are<br>
invisible objects that are set to
respond to the names<br>
they are assigned, such as
"ceiling", "wall", etc, <br>
handling the job of providing a
description when<br>
a person looks at the ceiling,
wall, etc. These kinds<br>
of dummy items are automatically
created when a room<br>
is loaded, based on what the
SetItems directive of<br>
the room contains.<br>
You'll also find dummy items for
special<br>
tasks, like a dummy button to
push in the town church.<br>
<br>
Because of this specialized
role, dummy<br>
items are not intended to be
picked up or manipulated<br>
the way regular items are. If you
clone a dummy <br>
item, it's not going to behave
the way you want<br>
it to. A dummy item should only
ever be brought into<br>
existence by your code, not by
the clone command.<br>
<br>
&nbsp;<br>
<a name="2.40"></a><span
 style="font-weight: bold; text-decoration: underline;">Clan
objects do nothing but screw things up.</span><br>
<br>
Quite right! If you don't code a
clan object<br>
properly, it's extremely likely
to have little effect<br>
aside from screwing up a player's
savefile so badly<br>
that it needs to be destroyed.<br>
Why is this? Clan object code is
basically<br>
legacy guild code from Dead Souls
1.x. In the old <br>
versions of Dead Souls, guilds
were player-run <br>
institutions, operating basically
as clubs, with<br>
guild objects as a kind of
membership token.<br>
The version of LIB_GUILD that
came with<br>
Dead Souls 1.x was fatally buggy
in various ways.<br>
The most important way is that
even if you got it<br>
to work right, it did nothing
useful. There was<br>
no interaction with a guild or
player daemon,<br>
so if the guild leader quit, they
lost their<br>
guild leader status. Aside from
holding an object<br>
which designated them as a member
of a particular<br>
guild, LIB_GUILD provided no
advantage.<br>
I renamed it to LIB_CLAN,
because as a<br>
social-club object, that's a bit
closer to its<br>
role than "guild", which tended
to cause much<br>
confusion.<br>
Eventually there will be a
CLAN_D, and more<br>
sophisticated error handling to
prevent character<br>
file corruption. For now (version
2.0 of Dead Souls),<br>
just avoid using it.<br>
<br>
<br>
<a name="2.41"></a><span
 style="font-weight: bold; text-decoration: underline;">My
NPC's stats are all hosed up.</span><br
 style="font-weight: bold; text-decoration: underline;">
<br>
Make sure you have SetLevel()
*after* SetRace() and SetClass().<br>
Also make sure there's a working
::create() in your create<br>
function. Some examples are:<br>
<br>
::create();<br>
npc::create();<br>
vendor::create();<br>
<br>
And make sure your init()
function has an:<br>
<br>
::init();<br>
<br>
<br>
<a name="2.42"></a><span
 style="font-weight: bold; text-decoration: underline;">This
squirrel is taking *forever* to kill.</span><br>
<br>
The mud is calculating its health
points based on level and<br>
race. If your squirrel has 340hp,
it'll seem unreasonably<br>
tough. Use SetMaxHealthPoints()
to cap its vitality to<br>
something like, say, 5.<br>
<br>
Also, humans tend to be pretty
crappy at combat, unless<br>
they are of the fighter class.
Even a rat can be<br>
a challenge for a wimpy, weak
little level 1 human. Try<br>
using a dwarf or an orc to fight,
or make your character<br>
a fighter with: <span style="font-weight: bold;">call
me-&gt;ChangeClass("fighter")</span><br>
<br>
Please note that <a href="#4.21">carrying anything at all
tends to <br>
seriously hamper your ability to fight</a>. Drop anything<br>
you're not carrying or wielding,
or put it in a backpack.<br>
<br>
Even slips of paper and a bag of feathers. Anything at all<br>
in your possession will make it super hard to fight.<br>
<br>
An admin can change this so that encumbrance has no effect<br>
at all. On ds2.1a15 and above, this is done with the command:<br>
<br>
<span style="font-weight: bold;">mudconfig encumbrance off<br>
<br>
</span>and a reboot. On Dead Souls 2.4.1 and above, combat encumbrance
is<br>
disabled by default.<br>
<span style="font-weight: bold;"></span><br>
<br>
<a name="2.43"></a><span
 style="font-weight: bold; text-decoration: underline;">My
room should not be entered/exited by just anyone. How</span><br
 style="font-weight: bold; text-decoration: underline;">
<span style="font-weight: bold; text-decoration: underline;">do
I control this?</span><br>
<br>
There are a couple of ways of
controlling entry to a room.<br>
Take a look at the "AddExit"
method in:<br>
/domains/town/room/valley.c<br>
<br>
And also review the "CanReceive"
style in:<br>
/domains/town/room/wiz_hall.c<br>
<br>
To prevent a room being exited
unless certain conditions<br>
are met, use CanRelease().<br>
<br>
These strategies are not
discussed in detail in the Creators Manual,<br>
but the examples above should
provide ample information as<br>
to how to structure them.<br>
<br>
Note that in general, objects
with a CanReceive() override <br>
should return ::CanReceive()
unless there is a<br>
good reason otherwise. It would
look like this:<br>
<br>
<span style="font-weight: bold;">int
CanReceive(object ob){<br>
<br style="font-weight: bold;">
&lt;if blah return 1&gt;</span><br style="font-weight: bold;">
<span style="font-weight: bold;">&lt;if bleh
return 0&gt;</span><br style="font-weight: bold;">
<span style="font-weight: bold;">&lt;etc and so
on&gt;</span><br style="font-weight: bold;">
<br style="font-weight: bold;">
<span style="font-weight: bold;">return
::CanReceive();</span><br style="font-weight: bold;">
<span style="font-weight: bold;">}</span><br>
<br>
Obviously the stuff between the
&lt;&gt; symbols is pseudocode and<br>
not LPC.<br>
<br>
<br>
<a name="2.44"></a><span
 style="font-weight: bold; text-decoration: underline;">I
zapped a monster, but instead of being dead, now it's undead!</span><br>
<br>
Take a look at the code for this
NPC. It probably has<br>
eventDie() overridden in a way
that does not return 1. This is<br>
not necessarily wrong. You may
*want* a monster that doesn't<br>
die like normal monsters do. But
if this behavior is unintended,<br>
that is probably the cause.<br>
<br>
<br>
<span style="font-weight: bold; text-decoration: underline;"><a
 name="2.45"></a>How does the format for race files work?</span><br>
<br>
Race attributes are specified in
race files. They are found in<br>
/secure/cfg/races<br>
<br>
Here's a template with parameters
in parentheses for clarity:<br>
<br>
<span style="font-weight: bold;">RACE</span> (race name here)<br>
<span style="font-weight: bold;">SENSITIVITY</span> (low light
threshold):(bright light
threshold)<br>
<span style="font-weight: bold;">LANGUAGE</span> (self-explanatory)<br>
<span style="font-weight: bold;">RESISTANCE</span> (damage type):(how
resistant we are
to the damage)<br>
<span style="font-weight: bold;">STATS</span> (name of the stat):(the
average):(how
important. 1 is high)<br>
<span style="font-weight: bold;">LIMB</span> (limb name):(where it
attaches):(how
important. 1 is high):(armor types)<br>
<span style="font-weight: bold;">SKILL</span> (skill name):(starting
level):(how
important. 1 is high):(unused):(unused)<br>
<br>
The unused fields in the skill
section are reserved for<br>
future implementation.<br>
<br>
If the third field in the LIMB
line is 1, losing that<br>
limb will cause immediate death.<br>
<br>
Special keywords can be appended
for particular functionality.<br>
These are:<br>
<br>
<span style="font-weight: bold;">FLYINGRACE</span> (enables flying)<br>
<span style="font-weight: bold;">LIMBLESSRACE</span> (enables limbless
travel)<br>
<span style="font-weight: bold;">LIMBLESSCOMBATRACE</span> (enables
limbless combat)<br>
<span style="font-weight: bold;">NONBITINGRACE</span> (some races can't
or won't bite)<br>
<span style="font-weight: bold;">NOT_MEAT</span> (specifies that when
it dies, a meat corpse shouldn't appear)<br>
<span style="font-weight: bold;">SWIMMING_RACE</span> (enables travel
in water)<br>
<span style="font-weight: bold;">PLAYER_RACE
1</span> (enables the selection
of this race
for players)<br>
<br>
Please note that while the
LIB_BODY object does<br>
specify a number of fingers, they
aren't items that<br>
can be severed, and their purpose
mostly is determining<br>
what kind of gloves you can wear.<br>
<br>
NOT_MEAT is available in Dead Souls alpha 19 and above.<br>
If NOT_MEAT is specified, then an npc of that race should<br>
have SetBodyComposition() in its create() function.<br>
For example, a rock golem should have:<br>
<br>
SetBodyComposition("rock");<br>
<br>
Please see /domains/default/npc/dummy.c for an example.<br>
<br>
If an npc's race is NOT_MEAT, and it is not a robot,<br>
and SetBodyComposition() is absent, it may not leave<br>
any remains at all upon death, unless it has a composition<br>
set by default in /lib/races.c <br>
<br>
Dead Souls alpha libs have the following additional racial options:<br>
</big>
<small> </small><small> </small><small> </small><small> </small><small></small><small></small><small></small><small></small><small></small><small></small><small></small><small></small><small></small><small></small><small></small><small></small><small></small><small></small><small></small>
<table style="width: 100%; text-align: left; font-family: courier new;"
 border="1" cellpadding="2" cellspacing="2">
  <tbody>
    <tr>
      <td style="vertical-align: top;"><small>MASS<br>
      </small></td>
      <td style="vertical-align: top;"><small>An
integer corresponding roughly
to weight on planet Earth, in pounds, multiplied by 10.<br>
      </small></td>
    </tr>
    <tr>
      <td style="vertical-align: top;"><small>SIZE<br>
      </small></td>
      <td style="vertical-align: top;"><small>/include/size_types.h<br>
      </small></td>
    </tr>
    <tr>
      <td style="vertical-align: top;"><small>RESPIRATION_TYPE<br>
      </small></td>
      <td style="vertical-align: top;"><small>/include/respiration_types.h<br>
      </small></td>
    </tr>
    <tr>
      <td style="vertical-align: top;"><small>BODY_TYPE<br>
      </small></td>
      <td style="vertical-align: top;"><small>/include/body_types.h<br>
      </small></td>
    </tr>
  </tbody>
</table>
<big style="font-family: courier new;"><br>
<br>
<a name="2.46"></a><span
 style="font-weight: bold; text-decoration: underline;">How
does the format for class files work?</span><br>
<br>
Class files have only two types
of<br>
entry lines that Dead Souls
currently supports.<br>
The first is the name of the
class.<br>
<br>
Every line after that is
presumed to be<br>
a skill specification line, in
the following<br>
format:<br>
<br>
skill name:importance to the class (1 is highest):starting level<br>
<br>
<br>
<a name="2.47"></a><span
 style="font-weight: bold; text-decoration: underline;">What
do Properties do?</span><br>
<br>
Properties are a way to provide
flexibility in<br>
the lib. Objects usually work by
having variables<br>
that are modified by functions.
This allows a player<br>
to have, for example, a SpellBook
variable which<br>
contains the spells she knows,
and this variable in<br>
turn is affected by "spell
learning" functions, etc.<br>
<br>
Suppose, however, that I want to
set a<br>
variable in a player, but that
variable does not<br>
exist. This is tricky indeed,
because it would<br>
involve a modification to one or
more library objects,<br>
and reloading them...possibly
requiring re-logins<br>
or (very rarely) even rebooting
the mud.<br>
<br>
Instead you can use properties
as a quick<br>
and dirty way to get that
functionality without<br>
rewriting lib objects. For
example, if you do<br>
something like this:<br>
<br>
present("lamp",this_player())-&gt;SetProperty("blessed",
1);<br>
<br>
Then that lamp is blessed, and
maybe now<br>
a monster has a function like
this:<br>
<br>
if(present("lamp",this_player())-&gt;GetProperty("blessed"))
RunAway();<br>
<br>
SetProperty() and
SetProperties() are just<br>
convenient ways to create and
modify custom variables in<br>
objects and players on the fly.
Strictly speaking this<br>
is not good coding practice.
Anything useful enough to<br>
make into a Property is useful
enough to do in another way.<br>
However, it is available to you
as another implement<br>
in your coders' toolbox.<br>
<br>
<br>
<a name="2.48"></a><span
 style="font-weight: bold; text-decoration: underline;">How
do I add a prehensile limb to a player or NPC?</span><br>
<br>
victim-&gt;AddLimb("tentacle",
"torso", 2, ({A_WEAPON }))<br>
<br>
See the Creator's Manual for
details on adding, desting,<br>
and removing limbs.<br>
<br>
If a creature lacks a prehensile limb, they can't do<br>
things like get objects, wear clothes, wield weapons, etc.<br>
<br>
<br>
<a name="2.49"></a><span
 style="font-weight: bold; text-decoration: underline;">How
do I make a room occasionally display messages?</span><br>
<br>
Use SetAction. There is a
well-commented example<br>
of this in
/domains/town/room/shore.c . <br>
<br>
<br>
<a name="2.50"></a><span
 style="font-weight: bold; text-decoration: underline;">My
functional isn't working!</span><br>
<br>
Functionals are a kind of
reference to a function. They<br>
won't work everywhere. For the
most part they serve as a pointer,<br>
and are used the way a variable
would be used. If the place you<br>
put the functional wouldn't make
sense for a variable, it wouldn't<br>
make sense for the functional
either. For example,<br>
<br>
SetLong( (: ShowLong :) );<br>
<br>
makes sense, because what's
happening is that instead of<br>
a string, your argument is a
function <span style="font-style: italic;">that returns a
string</span>.<br>
<br>
However, something like this
wouldn't work,<br>
<br>
if( Cabbages == Kings ) (:
eventTalk :);<br>
<br>
because you're treating a
functional as if it were a function.<br>
It isn't. In a case like this,
your line should look like this:<br>
<br>
if( Cabbages == Kings )
eventTalk();<br>
<br>
<br>
<a name="2.51"></a><span
 style="font-weight: bold; text-decoration: underline;">I've
read the Creator's Manual but I still don't understand mappings and
arrays.</span><br>
<br>
Yeah, they can be tricky to get
a handle on. Let's suppose you're<br>
going to set up a nautical
commerce system, where you have to keep track<br>
of ships and their data. You
store ship data in a daemon, which is<br>
an object that stays loaded in
memory to manage information, but doesn't<br>
actually exist as a cloned item
in the game. We'll call it SHIPPING_D.<br>
<br>
So, SHIPPING_D needs to keep
track of how many ships there are.<br>
I would do this with an array,
not a mapping, because it is a simple<br>
list, like this:<br>
<br>
string *ship_list = ({ "Caine",
"Bounty" });<br>
<br>
That way, when SHIPPING_D gets
queried for a list of all known<br>
ships, it can just return that
simple list. If you needed to add a<br>
ship, you'd have the daemon
perform this operation:<br>
<br>
ship_list += ({ "Pequod" });<br>
<br>
To remove a ship:<br>
<br>
ship_list -= ({ "Caine" });<br>
<br>
Suppose, however, that not only
do you need to keep track of<br>
ship names, but also their
captains, crew complement, etc. You could try<br>
to use an array for this, but it
would be very unwieldy. This is because<br>
to pick out specific elements,
you need to use a number. For example,<br>
if the ship_list array is ({
"Caine", "Bounty", "Pequod" }) then<br>
ship_list[0] is "Caine" and
ship_list[2] is "Pequod".<br>
If you were to try having an
array for each ship that<br>
contained complex information,
you'd have stuff like this:<br>
<br>
ship_list += ({ "Caine", "Queeg",
117, "military", "destroyer minesweeper", 0 })<br>
<br>
There are a couple of problems
with this. First, the ship_list<br>
array is going to be a bit of a
mess. Second, you'll have to address the<br>
ship's data elements by their
array index number. For example, to know<br>
the Caine's crew complement,
you'll need to do something like this:<br>
<br>
foreach(string *ship_data in
ship_list){<br>
if(ship_data[0] == "Caine")
return ship_data[2];<br>
}<br>
<br>
The first step is to check each
element in ship_list to<br>
know if its first element is
"Caine", then return its third element,<br>
which is 117. Not only is this
inelegant and overcomplicated, <br>
it is not guaranteed to work.
Careless manipulation of your subarrays<br>
can result in elements being out
of order, with potentially<br>
disastrous results on your code.
It's just not a wise way to <br>
go about this. This is where
mappings come in. Rather than the mess<br>
above, we'd do it like this:<br>
<br>
mapping AllShips = ([]);<br>
<br>
AllShips["Caine"] = ([ "captain"
: "Queeg", "complement" : 117, "type" : "military",<br>
"class" : "destroyer
minesweeper", "cargo" : 0 ]);<br>
<br>
It looks more complicated, but
in fact it's a major simplification<br>
of your data and its access. Now
you have a sure-fire way to query<br>
a specific ship and its specific
data elements without a shadow of doubt<br>
as to what you'll get back.<br>
<br>
Now if you want to know the name
of the Caine's captain,<br>
it looks like this:<br>
<br>
return
AllShips["Caine"]["captain"];<br>
<br>
Basically this is a mapping
inside a mapping. The mapping called<br>
Caine contains the element
"captain". Because the mapping Caine is an<br>
element in the mapping AllShips,
you access an element in it in the way<br>
shown above. <br>
<br>
In a less complicated example,
mappings might be used, for<br>
example to store information
about, say, fish:<br>
<br>
mapping FishTypes = ([ "carp" :
"freshwater", "tuna" : "saltwater" ]);<br>
<br>
So that FishTypes["carp"] is
"freshwater".<br>
<br>
To remove a mapping element, use
the map_delete efun:<br>
<br>
map_delete( FishTypes, "carp" );<br>
<br>
<br>
<span style="font-weight: bold; text-decoration: underline;"><a
 name="2.52"></a>Why are call_outs so bad?</span><br>
<br>
<span style="color: rgb(0, 102, 0);">Garfield@M*U*D
&lt;ds&gt; I'm wondering.. Why are call_outs so bad?</span><br>
<br>
Cratylus &lt;ds&gt; ya good
question<br>
<br>
Cratylus &lt;ds&gt; in themselves
they arent. One call_out more or less wont make the angels cry<br>
<br>
<span style="color: rgb(0, 102, 0);">Garfield@M*U*D
&lt;ds&gt; From what I can tell, they shouldn't be too bad if not
implemented poorly</span>.<br>
<br>
Cratylus &lt;ds&gt; the problem
is that if your creators get the idea call_outs are ok, you'll be
swamped with them<br>
<br>
<span style="color: rgb(0, 102, 0);">Garfield@M*U*D
&lt;ds&gt; Right. You want 10s of them, not 100s.</span><br>
<br>
Cratylus &lt;ds&gt; and they, for
reasons i cant explain to you because it's driver related, are
expensive to run<br>
<br>
<span style="color: rgb(0, 102, 0);">Garfield@M*U*D
&lt;ds&gt; Can't explain because you're not familiar with the driver?</span><br>
<br>
Cratylus &lt;ds&gt; right<br>
<br>
<span style="color: rgb(0, 102, 0);">Garfield@M*U*D
&lt;ds&gt; Right. Fair 'nuff.</span><br>
<br>
Cratylus &lt;ds&gt; but i can
vouch for the truth of the proposition<br>
<br>
Cratylus &lt;ds&gt; limbs used to
decompose, each with a call_out of its own<br>
<br>
Cratylus &lt;ds&gt; if you
released the rage virus into the menagerie, your mud would eventually
crawl to a stop<br>
<br>
<span style="color: rgb(0, 102, 0);">&lt;ds&gt;
Garfield@M*U*D hehs.</span><br style="color: rgb(0, 102, 0);">
<br style="color: rgb(0, 102, 0);">
<span style="color: rgb(0, 102, 0);">Garfield@M*U*D
&lt;ds&gt; What amount of call_outs are we talking here? Hundreds?
Thousands?</span><br>
<br>
Cratylus &lt;ds&gt; fewer than
200 as i recall<br>
<br>
Cratylus &lt;ds&gt; but the
memory is hazy<br>
<br>
<span style="color: rgb(0, 102, 0);">Garfield@M*U*D
&lt;ds&gt; Hrm. Ick.</span><br style="color: rgb(0, 102, 0);">
<br style="color: rgb(0, 102, 0);">
<span style="color: rgb(0, 102, 0);">Garfield@M*U*D
&lt;ds&gt; I might peek at how they work.</span><br>
<br>
Cratylus &lt;ds&gt; it also
redlined the processor<br>
<br>
<span style="color: rgb(0, 102, 0);">Garfield@M*U*D
&lt;ds&gt; Right.</span><br>
<br>
Cratylus &lt;ds&gt; lucky for me
i have a 4-way box<br>
<br>
<br>
<a name="2.53"></a><span
 style="font-weight: bold; text-decoration: underline;">Fine.
How am I supposed to create timed events, then?</span><br>
<br>
There is a built in timing
system that uses the heart_beat()<br>
efun. To enable it, use
set_heart_beat() on the object that is<br>
to have a timed effect.
set_heart_beat(1) gives the object about one<br>
heart_beat per second.
set_heart_beat(60) gives it a heart_beat<br>
about once a minute.<br>
<br>
Whenever the object has a
heart_beat happen, the function<br>
heart_beat() is called in it. So,
for example, an NPC might have<br>
a heart_beat function like this:<br>
<br>
void heart_beat(){<br>
this_object()-&gt;eventForce("say hi!");<br>
}<br>
<br>
If the NPC's create() function
contains a set_heart_beat(10)<br>
then it will say "Hi!" every ten
seconds. <br>
<br>
Another way to control it would
be to have a counter.<br>
You would define a global integer
variable by putting in in the body<br>
of the NPC's file before any
functions are defined. For example:<br>
<br>
int counter = 0;<br>
<br>
somewhere before the create()
function. Then your heart_beat<br>
function might look like this:<br>
<br>
void heart_beat(){<br>
counter++;<br>
if(counter &gt; 10) { <br>
this_object()-&gt;eventForce("say hi!");<br>
counter = 0;<br>
}<br>
}<br>
<br>
If the NPC's heart_beat is set
to 1, then the NPC will make<br>
his greeting about every ten
seconds. If its heart_beat is set to<br>
ten, then it'll take a minute and
forty seconds per greeting. Note<br>
that at the end of the if()
check, the counter is reset to 0 if<br>
the action is triggered.<br>
<br>
<br>
<a name="2.54"></a><span
 style="font-weight: bold; text-decoration: underline;">I
need a list of all the functions available.</span><br>
<br>
If you read the section on efuns
and sefuns, you have an<br>
idea of what they are. They are
documented in /doc/sefun and<br>
/doc/efun , and doing a list of
the dirs and subdirs there<br>
will give you a "list" of them.
The documentation on individual<br>
sefuns and efuns is generally
available through the man command,<br>
for example: <span style="font-weight: bold;">man sscanf<br>
<br>
</span>If you're looking for
lists of library functions,<br>
such as SetClass in LIB_WEAPON,
your best bet is the help<br>
command, like this:<br>
<br style="font-weight: bold;">
<span style="font-weight: bold;">help library
objects weapon</span><br style="font-weight: bold;">
<br style="font-weight: bold;">
<span style="font-weight: bold;">help library
objects creator</span><br>
<br>
That will list the functions in
the library object<br>
you specify. As of this writing,
the documentation on lfuns<br>
is not yet as thorough as the
documentation on efuns and sefuns,<br>
but this documentation is an
ongoing project whose output<br>
should eventually improve.<br>
<br>
See also <a href="#2.71">question
2.71</a><br>
<br>
<br>
<a name="2.55"></a><span
 style="font-weight: bold; text-decoration: underline;">How
do I make an object you can [ jump on | climb | etc ] ?</span><br>
<br>
Look for an example, and copy
it. Take a look at the<br>
code in the newbie mansion ladder
for climb code. Take a look<br>
at
/domains/Ylsrim/room/bank_roof.c for an example of something<br>
you can jump from. Other actions
will have similar examples. The<br>
sample domains are there for you
to explore and find examples<br>
of what you want to do.<br>
<br>
<br>
<a name="2.56"></a><span
 style="font-weight: bold; text-decoration: underline;">Where
is the list of available skills? How do I add skills?</span><br>
<br>
Please read the Administrator's
Guidebook chapter<br>
entitled "Understanding the Lib",
and skip to section named <br>
"Section IV: Skills".<br>
<br>
<br>
<a name="2.57"></a><span
 style="font-weight: bold; text-decoration: underline;">Where
is the list of available classes? How do I add a class?</span><br>
<br>
Type: <span style="font-weight: bold;">ls
/secure/cfg/classes</span><br>
<br>
To add a class, copy one of
those files and call it<br>
whatever the class should be. For
example:<br>
<br>
<span style="font-weight: bold;">cd
/secure/cfg/classes</span><br style="font-weight: bold;">
<span style="font-weight: bold;">cp thief farmer</span><br>
<br>
The modify the new file to suit
you. When<br>
you're done, use <span style="font-weight: bold;">admintool</span> to
add the class to the class<br>
daemon. Type <span style="font-weight: bold;">help admintool</span>
for information on that command.<br>
<br>
Obviously, you'll need to be an
admin or assistant<br>
admin for this to work.<br>
<br>
<br>
<a name="2.58"></a><span
 style="font-weight: bold; text-decoration: underline;">Where
is the list of available races?</span> <br>
<br>
Type: <span style="font-weight: bold;">ls /secure/cfg/races</span><br>
<br>
For details on adding races, see
the <a href="ds-admin-faq.html">admin
FAQ</a>.<br>
<br>
<br>
<span style="font-weight: bold; text-decoration: underline;"><a
 name="2.59"></a>How do languages work? Is there a list of them?</span><br>
<br>
There is no list of languages.
It doesn't work that way.<br>
There is no centralized language
database, daemon, or anything<br>
like that. Languages are
basically like a skill: only useful to<br>
the extent that lib objects make
use of them.<br>
<br>
A player might be able to
understand Tamarian, but if<br>
nobody else in the lib does, it
isn't much use. If no written material<br>
is in Tamarian besides, then the
player's language ability is a waste.<br>
<br>
On the other hand, if a player
wants to be able to<br>
understand orcs, all she has to
do is find a language teacher<br>
that can instruct her in that
tongue. After enough lessons,<br>
she will be at 100% fluency, and
if she encounters written or<br>
spoken information in Tangetto,
she'll be able to understand<br>
all of it.<br>
<br>
To know what languages you
understand, and to what<br>
extent, use the command:<br>
<br>
<span style="font-weight: bold;">language</span><br>
<br>
To make yourself fluent in
English, type:<br>
<br>
<span style="font-weight: bold;">anglicize me</span><br>
<br>
To make yourself fluent in all
languages, type:<br>
<br>
<span style="font-weight: bold;">polyglottize me</span><br>
<br>
Obviously these commands are
available only to creators.<br>
<br>
<br>
<a name="2.60"></a><span
 style="font-weight: bold; text-decoration: underline;">When
I try to call Bozo-&gt;SetLanguage("Clownish", 50), it sets it to 100%</span><br>
<br>
Bozo is probably a newbie. If
Bozo's player level is at or below<br>
what is defined as newbie in
/secure/include/config.h, then he understands<br>
all languages at 100%. Raise his
level above that, and you should see<br>
his proficiency in that language
drop to what you specified.<br>
<br>
<br>
<a name="2.61"></a><span
 style="font-weight: bold; text-decoration: underline;">How
do I update an .h file?</span><br>
<br>
You don't, really. That's a
header file, which contains code to<br>
be included by a .c file. Only a
.c file gets loaded into memory, so<br>
to "update" an .h file, you
update the .c file that includes it. In<br>
the case of a global include,
like daemons.h, you would update the<br>
master object (also called the
master daemon) thusly:<br>
<br>
<span style="font-weight: bold;">update
/secure/daemon/master</span><br style="font-weight: bold;">
<br>
<br>
<br>
<a name="2.62"></a><span
 style="font-weight: bold; text-decoration: underline;">I
want to put an object in a room that doesn't show up in the inventory</span><br
 style="font-weight: bold; text-decoration: underline;">
<span style="font-weight: bold; text-decoration: underline;">but
it can be manipulated.</span><br>
<br>
Typically the job of "being
invisible but examinable" is something<br>
done by dummy items. In <a href="ds-creator-faq.html#2.39">FAQ
2.39</a> you read about how dummy
items work and<br>
how they let you have things in
rooms that are looked at, but not taken.<br>
<br>
Suppose, however, that you want
to have a sittable bench in the long<br>
description, but you don't want
it to show up in the room's inventory. Or<br>
a chest that can be opened and
closed, but again, not part of the<br>
room's inventory list?<br>
<br>
You can't just make the item
invisible, because then "look at bench"<br>
will return "There is no bench
here." The solution is to *inherit* a<br>
dummy item, and and give it
benchy functionality by also inheriting the<br>
things a sittable object needs.
For example:<br>
<br>
#include &lt;lib.h&gt;<br>
inherit LIB_BASE_DUMMY;<br>
inherit LIB_SIT;<br>
inherit LIB_SURFACE;<br>
<br>
static void create() {<br>
</big><big style="font-family: courier new;">&nbsp;&nbsp;&nbsp; </big><big
 style="font-family: courier new;">base_dummy::create();<br>
</big><big style="font-family: courier new;">&nbsp;&nbsp;&nbsp; </big><big
 style="font-family: courier new;">
surface::create();<br>
</big><big style="font-family: courier new;">&nbsp;&nbsp;&nbsp; </big><big
 style="font-family: courier new;">
SetKeyName("bench");<br>
</big><big style="font-family: courier new;">&nbsp;&nbsp;&nbsp; </big><big
 style="font-family: courier new;">
SetId("bench");<br>
</big><big style="font-family: courier new;">&nbsp;&nbsp;&nbsp; </big><big
 style="font-family: courier new;">
SetAdjectives("wooden");<br>
</big><big style="font-family: courier new;">&nbsp;&nbsp;&nbsp; </big><big
 style="font-family: courier new;">
SetShort("a wooden bench");<br>
</big><big style="font-family: courier new;">&nbsp;&nbsp;&nbsp; </big><big
 style="font-family: courier new;">
SetLong("This is a typical
wooden bench, the sort you might "+<br>
</big><big style="font-family: courier new;">&nbsp;&nbsp;&nbsp; </big><big
 style="font-family: courier new;">&nbsp;&nbsp;&nbsp; </big><big
 style="font-family: courier new;">
"see in a park. It appears
designed for sitting on.");<br>
</big><big style="font-family: courier new;">&nbsp;&nbsp;&nbsp; </big><big
 style="font-family: courier new;">
SetMaxSitters(3);<br>
</big><big style="font-family: courier new;">&nbsp;&nbsp;&nbsp; </big><big
 style="font-family: courier new;">
SetInvis(1);<br>
&nbsp;&nbsp;&nbsp; SetPreventGet(</big><big
 style="font-family: courier new;">"The bench does not budge.");</big><br>
<big style="font-family: courier new;">}<br>
<br>
<br>
You can then add this file to
your room's inventory, <br>
and now you'll have a bench that
doesn't show up in the<br>
room's inventory, but can be
examined and used. In the case of<br>
a chest or a wardrobe, you'd want
to inherit LIB_DUMMY<br>
and LIB_STORAGE. There are some
key rules to keep in mind when <br>
doing this:<br>
</big>
<ol style="font-family: courier new;">
  <small> </small><big> </big> <li><big>Always inherit
LIB_BASE_DUMMY first.</big></li>
  <small> </small><big> </big> <li><big>Always invoke
dummy::create()
before other ::creates()'s.</big></li>
  <small> </small><big> </big> <li><big>Make sure you have CanGet()
return an error string.</big></li>
  <small> </small><big> </big> <li><big>Make sure the item is
SetInvis(1).</big></li>
</ol>
<ol style="font-family: courier new;">
  <small> </small>
</ol>
<big style="font-family: courier new;">In Dead Souls 2.5a21 and below,
inherit LIB_DUMMY, not<br>
LIB_BASE_DUMMY, and use dummy::create(); rather than<br>
base_dummy::create();<br>
<br>
</big><big style="font-family: courier new;"><br>
<a name="2.63"></a><span
 style="font-weight: bold; text-decoration: underline;">What
is pass by reference? What is pass by value?</span><br>
<br>
This is a slippery concept to
grasp for many folks. It has<br>
to do with the way that a
variable is handled, when it interacts<br>
with a function. <br>
<br>
When you pass by value, you send
to the function the<br>
value that is held by the
variable. When you pass by reference, you<br>
send to the function a pointer to
the variable, not the value that<br>
it contains. This is critically
important to what happens to the<br>
variable when the function is
done doing its work. Let's take a look<br>
at a sample function:<br>
<br>
<img alt="function drawing" src="function.jpg"
 style="width: 248px; height: 373px;" align="left"><a
 href="function.jpg">This
is your typical simple function</a>.
It<br>
wants to be fed some input at the
top, then<br>
it will digest it in the middle,
and then<br>
it will poop out whatever the
result of its<br>
digestion is. That's the return,
down at the<br>
bottom.<br>
<br>
This one wants to be fed an
integer. When you <br>
put the integer into its feeding
funnel at the<br>
top, that integer will be stored
in the function's<br>
local variable "B". B will stand
for that integer.<br>
<br>
The function then adds the
integer 1 to B. B is now<br>
whatever you put into the
function plus one. <br>
<br>
This new value is what is now
returned, when the<br>
function completes.<br>
<br>
Pretty straightforward. Let's
look at actually<br>
sending data to this function.<br>
<br>
<br>
<br>
<img style="width: 212px; height: 317px;" src="value.jpg"
 alt="pass by value" align="left">At the top of <a href="value.jpg">this
illustration</a> you see a variable called "A".<br>
A is of the type "integer", and
it contains the value 42. We're<br>
going to feed A to
SimpleFunction. We will "<span style="font-weight: bold;">pass by value</span>".<br>
<br>
What is happening is that
whatever it is that A contains as a<br>
value, we are sending to our
function. We therefore are feeding<br>
the integer 42 to SimpleFunction.<br>
<br>
SimpleFunction does its thing. B
is now equal to 42. Then <br>
we add 1 to it. Now B is equal to
43.<br>
<br>
We are done. The function poops
out 43 as the return value.<br>
B is a local variable, so when
the function ends, its value<br>
resets and it is null. At the end
of this process:<br>
return value == 43, A == 42, B == NULL <br>
<br>
<br>
<img alt="pass by reference" src="reference.jpg"
 style="width: 228px; height: 312px;" align="left"><br>
<a href="reference.jpg">We will now
send data again</a>, but this
time, we will "<span style="font-weight: bold;">pass by reference</span>".<br>
This is slightly different. In
the previous example, we passed the<br>
value of A to SimpleFunction.
Instead, we will now pass <span
 style="font-style: italic; font-weight: bold;">a
reference to A </span>to the
function. For all
practical purposes we are not sending 42. We are sending the variable A
itself.<br>
<br>
The implications are
important.
When we feed A to SimpleFunction,<br>
B no longer means "a local
variable named B". B becomes a pointer<br>
to A. This means that even though
the function, as written, reads<br>
B = B + 1, when you pass by
reference you are actually performing<br>
the operation on the referenced
variable itself, so what it's actually doing is A = A +1. At the end of
this process:<br>
return value == 43, A == 43, B == NULL<br>
<br>
<br>
<br>
You can see why it is vitally
important to grasp this concept. <br>
If you perform a pass by
reference operation, you will get the exact<br>
same return, or output, from the
function as if you had passed by<br>
value. However, you will have
modified the variable you passed to the<br>
function. If that's what you want
to do, great. But if you do it<br>
by accident, woe is you.<br>
<br>
Note that in ds2.1a16 and above, you can use the "ref" keyword<br>
to force a simple variable to pass by reference. For an example,<br>
see /domains/default/obj/pass_example.c <br>
<br>
<br>
<a name="2.64"></a><span
 style="font-weight: bold; text-decoration: underline;">ZOMG
pass by reference is terrible! How do I avoid it?</span><br>
<br>
Fortunately, simple LPC
datatypes do not pass by reference<br>
as default behavior. Strings and
integers pass by<br>
value, so you don't have to worry
about accidentally mangling<br>
that data.<br>
<br>
However, objects, mappings,
functions, and arrays all<br>
pass by reference. If you are not
careful in handling those datatypes,<br>
you can end up with some
extremely puzzling outcomes. When <br>
manipulating complex datatypes,
it is useful to use the copy()<br>
sefun, if you don't want to
modify the original variable. for<br>
example:<br>
<br>
string *SubtractElement(string
*InputArray){<br>
string *LocalArray =
copy(InputArray);<br>
LocalArray -= ({ LocalArray[0] });<br>
return LocalArray;<br>
}<br>
<br>
This function takes a string
array as an argument,<br>
and returns an array that is like
the input array, but without<br>
its first element. By using the
copy() sefun, we manipulated<br>
the an array identical to
InputArray in value, while leaving<br>
InputArray itself alone. If
instead of:<br>
<br>
string *LocalArray =
copy(InputArray);<br>
<br>
we had used:<br>
<br>
string *LocalArray = InputArray;<br>
<br>
Then the return value would have
been the same, but<br>
whatever the array was that we
passed to this function as an<br>
argument has been modified.<br>
<br>
<br>
<a name="2.65"></a><span
 style="font-weight: bold; text-decoration: underline;">What
does the :: operator do?</span><br>
<br>
Detah &lt;ds&gt; does anyone have
time to explain 1 line of code to me please. specifically score.c L15
daemon::create()<br>
<br>
<span style="color: rgb(0, 102, 0);">Cratylus
&lt;ds&gt; hmm</span><br>
<br>
<span style="color: rgb(0, 102, 0);">Cratylus
&lt;ds&gt; the :: is the "scope resolution operator"</span><br
 style="color: rgb(0, 102, 0);">
<br style="color: rgb(0, 102, 0);">
<span style="color: rgb(0, 102, 0);">Cratylus
&lt;ds&gt; that line says "in the file i inherited called daemon, run
the create function"</span><br>
<br>
Detah &lt;ds&gt; so to understand
that line, I need to go to daemon.c and read the create() fun there?<br>
<br>
<span style="color: rgb(0, 102, 0);">Cratylus
&lt;ds&gt; yep</span><br>
<br>
Detah &lt;ds&gt; ty<br>
<br>
<span style="color: rgb(0, 102, 0);">Cratylus
&lt;ds&gt; np<br>
<br>
</span><br>
<a name="2.67"></a><span
 style="text-decoration: underline; font-weight: bold;">I
<span style="font-style: italic;">know</span> this file is fine. I
copied it from another file that</span><br
 style="text-decoration: underline; font-weight: bold;">
<span style="text-decoration: underline; font-weight: bold;">works,
but it won't update. This is driving me insane.</span><br>
<br>
There are few circumstances under
which a properly-coded file will not update:<br>
<br>
1) Files placed in /tmp will not
update.<br>
<br>
2) Verbs placed outside the /verb
dir will not update.<br>
<br>
3) Dead Souls does not handle
files with spaces in the name.<br>
<br>
4) If the file you copied from
has a relative include (such as #include "./customdefs.h" )<br>
and you copy that to a different
directory, the relative include will make<br>
the update fail if you don't
have the header file where it expects it.<br>
<br>
5) If the file has a
SetInventory() that contains broken files or broken filenames or<br>
files that do not exist, the
update will probably fail in some way.<br>
<br>
6) Files in directories that
aren't readable to you won't update.<br>
<br>
7) .h files do not update.<br>
<br>
8) Dead Souls is case-sensitive.
My_New_Room.c is a different file from my_new_room.c . <br>
<br>
<br>
<a name="2.68"></a><span
 style="font-weight: bold; text-decoration: underline;">What
is SetEncounter supposed to do?</span><br>
<br>
When objects meet in the same
environment, they call SetEncounter()<br>
in themselves to see if anything
interesting should occur, based<br>
on the other items in the
environment. <br>
<br>
In the case of an NPC,
SetEncounter(50) means "if a living thing<br>
comes into the room, and its
charisma is lower than 50, kill it".<br>
<br>
To make it always aggressive,
you'd set that to an appropriately <br>
high number.<br>
<br>
Alternately you can put a
function pointer in there, to make a<br>
more sophisticated condition for
attack, or perhaps something<br>
other than combat.<br>
<br>
See /domains/town/npc/orc.c for
an example.<br>
<br>
<br>
</big><big style="font-family: courier new;"><a name="2.69"></a><span
 style="font-weight: bold; text-decoration: underline;">I keep getting
"This should be edited by hand. Change cancelled."</span></big><small
 style="font-family: courier new;"><br>
<br>
</small>
<big style="font-family: courier new;">The QCS is carefully designed
and
calibrated to prevent you from<br>
creating broken objects or damaging working ones. Even so, it is<br>
possible to make very inconvenient mistakes with it.<br>
<br>
One of the most common ways for a newbie to shoot himself in the<br>
foot is by altering their workroom in a way he doesn't understand,<br>
then being unable to restore it to its original state.<br>
<br>
The workroom therefore has a feature that prevents it from being<br>
modified with the QCS. If you go to your workroom and type<br>
<span style="font-weight: bold;">more here</span> , you will see that
SetNoModify(1) is in the file. This<br>
makes the QCS refuse to make changes to the file. <br>
<br>
To make changes to your workroom, either use the mud's <a
 href="http://dead-souls.net/editor.html">line editor</a>,<br>
or use the following command while standing in your workroom:<br>
<span style="font-weight: bold;">modify here setnomodify 0</span><br>
<br>
By setting SetNoModify(0), you enable QCS to make changes to the room.<br>
<br>
Note that asking for help fixing a workroom you screwed up<br>
is an excellent way to brand yourself a Hopeless Newbie.<br>
<br>
<br>
<a name="2.70"></a><span
 style="font-weight: bold; text-decoration: underline;">zOMGLOLERZ I
did what said but no my workrom really IS broke!!1!</span><br>
<br>
In the inevitable case of someone damaging their workroom despite<br>
my warnings and safeguards, your homedir contains a default<br>
backup workroom file. To restore your workroom to its original,<br>
working form, type: <br>
<br>
<span style="font-weight: bold;">cd</span><br style="font-weight: bold;">
<span style="font-weight: bold;">mv workroom.c workroom.fukt1</span><br
 style="font-weight: bold;">
<span style="font-weight: bold;">cp workroom.bak workroom.c</span><br
 style="font-weight: bold;">
<span style="font-weight: bold;">update workroom.c</span><br
 style="font-weight: bold;">
<span style="font-weight: bold;">home</span><br>
<br>
<br>
<a name="2.71"></a><span
 style="font-weight: bold; text-decoration: underline;">I can't find
the SetQuatloos() lfun anywhere!</span><br>
<br>
One of the reasons people want a "list of all functions" is that<br>
tracking down where a given function is defined can be a real pain.<br>
<br>
For users of Dead Souls 2.1.1 and below, the only real option is<br>
to do the following:<br>
<br>
<span style="font-weight: bold;">cd &lt;directory to be searched&gt;</span><br
 style="font-weight: bold;">
<span style="font-weight: bold;">grep SetQuatloos *</span><br>
<br>
This will search the files in your current directory and list to<br>
you the files that contain your search string...in this case,
SetQuatloos.<br>
<br>
Users of 2.1a15 and above have more options available to them. They<br>
can use recursive grep:<br>
<br>
<span style="font-weight: bold;">cd /lib</span><br
 style="font-weight: bold;">
<span style="font-weight: bold;">grep -r SetQuatloos *</span><br>
<br>
This allows you to search not just your current directory, but all<br>
subdirectories as well.<br>
<br>
Neater still is the findfun command:<br>
<br>
<span style="font-weight: bold;">findfun SetQuatloos</span><br>
<br>
This is more precise than grep. "grep" will tell you where the string<br>
exists, but this includes places where it is called. "findfun" will tell<br>
you where in /lib the function is <span style="font-weight: bold;">defined</span>,
which means that it tells you<br>
which files contain the code that SetQuatloos() uses.<br>
<br>
For more information on finding and analyzing library functions, see:<br>
<span style="font-weight: bold;">help findfun</span><br
 style="font-weight: bold;">
<span style="font-weight: bold;">help showfuns<br>
<br>
</span>See also <a href="#2.54">Question 2.54</a><span
 style="font-weight: bold;"><br>
</span><br>
</big><big style="font-family: courier new;">
<br style="font-weight: bold; text-decoration: underline;">
<span style="font-weight: bold; text-decoration: underline;"><a
 name="2.72"></a>You said that what I want to do requires a daemon. I
am afraid.</span><br>
<br>
Think of a daemon as a kind of server program inside the mud. It<br>
just runs in the background, waiting to be called upon to perform<br>
some action. What daemons are commonly used for is managing information.<br>
If I told you that your project probably needs a daemon, it's probably<br>
because you're planning on saving some kind of information across
reboots<br>
that needs to be accessible to everyone. For example, if you're going<br>
to implement a railroad, you probably want to keep track of which<br>
train is where, what the different ticket prices are, etc. A daemon<br>
would serve as a repository of that data, managing the information<br>
and saving it in an object persistence file so it is preserved in<br>
case of reboot.<br>
<br>
There are many kinds of daemons. Some handle intermud connectivity, <br>
some handle player information. They are nothing to be afraid of, they<br>
are LPC objects with a job to do. Some of them are very large<br>
and have complicated code because they have big, complicated jobs.<br>
If, for example, you aim to play with the "master daemon", which<br>
handles mud security, you should be very sure you know what you're
doing.<br>
<br>
But by examining how other daemons do their thing, and by keeping<br>
frequent backups, and by the process of patient, persistent trial-<br>
and-error, you'll eventually ramp up to where your daemon code <br>
does what you want.<br>
<br>
<br>
</big><big style="font-family: courier new;"><a name="2.73"></a><span
 style="font-weight: bold; text-decoration: underline;">LOL I tried to
show something to someone in the shop but the vendor gave an error.</span><br>
<br>
This, and some other situations on the lib, are "bugs" that I plan<br>
to leave in place on purpose.<br>
<br>
The point is to illustrate an important aspect of parsing on Dead<br>
Souls. The shops inherit LIB_SHOP, meaning that they have add_action()'s<br>
that try to intercept some commands and feed them to the vendor in<br>
a way the vendor finds meaningful...for example, rather than<br>
"<span style="font-weight: bold;">ask oana to show omni</span>", you
can just "<span style="font-weight: bold;">show omni</span>" and Oana
gets the <br>
right idea as to what to do.<br>
<br>
If you then want to use the "show" verb, like "<span
 style="font-weight: bold;">show omni to cratylus</span>"<br>
because you want me to see what you just bought, the shop will intercept<br>
that "show" command before the verb gets processed, and Oana will<br>
get involved. If you leave the room, though, the "show" verb is<br>
no longer overridden by the shop's add_action() and you'll be<br>
able to impress me with your purchase.<br>
<br>
Why am I leaving this "broken" behavior in place? It's important for<br>
new admins to understand this interaction between add_action()<br>
parsing and verb parsing. It helps you understand how messy it can<br>
be when 3 or 4 objects in the same room have add_action()'s with<br>
the same trigger command, and it makes it more obvious why a lib-wide<br>
verb handler makes so much sense. <br>
<br>
<br>
</big><big style="font-family: courier new;"><a name="2.74"></a><span
 style="font-weight: bold; text-decoration: underline;">2.74 My object
keeps failing with an eval cost too high error.</span><br>
<br>
MudOS is a single-threaded program. Things have to happen one<br>
after the other. You cannot, for example, simultaneously search<br>
a large file for a string while the mud does something else.<br>
While the string is being looked for, nothing else happens on<br>
the mud until that operation completes.<br>
<br>
What this means is that if someone has coded an object carelessly,<br>
and it, for example, gets stuck in an enless search for a string,<br>
then the mud could be hung indefinitely. <br>
<br>
Fortunately, MudOS keeps track of how long a specific operation<br>
has been running, and there is a threshold for aborting an<br>
operation that has been hogging too much time. If your messed-up<br>
string search goes on beyond that threshold, the mud will stop<br>
it and return the eval cost too high error you've seen.<br>
<br>
While this might seem, on the surface, presumptuous, it is actually<br>
a very, very good thing. You do not need your mud lagging every<br>
few seconds because someone's ill-conceived NPC is hogging the<br>
thread. Nor do you need your creators able to bring your mud to<br>
a screeching halt through casual carelessness.<br>
<br>
However, sometimes you need to perform an operation that does<br>
take a long time. For example, you might want a way to index<br>
the files in your mud. With the DS distribution containing<br>
thousands of files, and disk I/O being the slowest operation<br>
a computer does, this would be made difficult.<br>
<br>
The answer is to break up the execution of a single operation<br>
into multiple operations via call_out(). A call_out will schedule<br>
the call of a function in its own execution stack. If your<br>
operation can be split up into multiple call_outs, then you<br>
have a better chance of avoiding the eval cost runtime error.<br>
<br>
For a specific example, see how the /secure/daemons/file.c<br>
daemon does its nightly indexing of lib files.<br>
<br>
Note that careless use of the call_out() efun in an attempt<br>
to evade eval cost restrictions can cause your mud to<br>
lag horribly. Use call_out() with <span style="font-weight: bold;">extreme</span>
caution.<br>
<br>
<br>
<a name="2.75"></a><span
 style="font-weight: bold; text-decoration: underline;">Please explain
( foo ? bar : baz )</span><br>
<br>
This is a spiffy and simple way to return a value based on<br>
the truth of a tested statement. <br>
<br>
Basically, </big><big style="font-family: courier new;">( foo ? bar :
baz ) means:<br>
<br>
If foo is true, then the returned value of this statement<br>
is bar. If it is not true, then the value of this statement<br>
is baz.<br>
<br>
An example might be:<br>
<br>
write("Pat folds a " + ( (pat-&gt;GetGender() == "female") ? "blouse."
: "shirt." ) );<br>
<br>
For the purposes of the test, the integer 0 counts as "not true" while<br>
a non-zero integer counts as "true". A defined variable of a non-integer<br>
type will tend to count as "true".<br>
<br>
This type of statement is sometimes referred to as a "ternary
conditional".</big><big style="font-family: courier new;"><br>
<br>
<br>
<a name="2.76"></a><span
 style="font-weight: bold; text-decoration: underline;">Where are
things like Town and race and starting money set for new players?</span><br>
<br>
The place to start looking is /secure/lib/connect.c<br>
Then review /lib/player.c for the "enter the game" and setup<br>
functions called by connect.c<br>
<br>
</big><big style="font-family: courier new;"><br>
<a name="2.77"></a><span
 style="font-weight: bold; text-decoration: underline;">How do I make
my NPC respawn sooner than the reset interval?</span><br>
<br>
To make a room check its inventory every 60 seconds and clone<br>
Lars if he's missing from that room:<br>
<br>
&nbsp;&nbsp;&nbsp; SetInventory(([<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "/domains/town/npc/lars" :
({ 60, 1})<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ]) );<br>
<br>
You can use this to restock containers as well. For an example<br>
of an automatically restocking weapons rack, see
/domains/default/obj/rack.c<br>
in Dead Souls 2.7a27 and above. <br>
</big><br>
<big style="font-family: courier new;">Note that if you use this method
for wandering monsters, your mud may<br>
soon be swamped with them, because the room only checks whether<br>
the object is in the <span style="font-weight: bold;">room</span>, not
whether it is in the <span style="font-weight: bold;">mud</span>.<br>
<br>
<br>
</big><big style="font-family: courier new;"><a name="2.78"></a><span
 style="font-weight: bold; text-decoration: underline;">My TalkResponse
NPC doesn't work, but it really really should!</span><br>
<br>
This is most often caused by the NPC not understanding the language<br>
that the player speaks. If the NPC's level is above MAX_NEWBIE_LEVEL,<br>
he only understands the languages his race gives him. Therefore<br>
your 10th level elf soothsayer hears your human's request for<br>
a prophecy just fine...he just doesn't understand Common or English,<br>
so he doesn't know what the human is actually saying.<br>
<br>
To make an NPC understand all languages, add this to his create() apply:<br>
<br>
SetPolyglot(1);<br>
<br>
<br>
</big>
<hr style="width: 100%; height: 2px; font-family: courier new;"><big
 style="font-family: courier new;">Section 3: Intermud and channel stuff<br>
<br>
<br>
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="3.1"></a><span
 style="font-weight: bold; text-decoration: underline;">How
do I know what other muds are online on intermud?</span><br>
<br>
<span style="font-weight: bold;"></span>Type: <span
 style="font-weight: bold;">mudlist<br>
<br>
</span>To see online Dead Souls
muds type: <span style="font-weight: bold;">mudlist -m dead<br>
</span><br>
<span style="font-weight: bold;"><br>
</span><span style="text-decoration: underline; font-weight: bold;"></span><a
 name="3.2"></a><span
 style="text-decoration: underline; font-weight: bold;">Hey,
LeetFooMud is online! How can I tell if Biff is logged on?</span><span
 style="font-weight: bold;"><br>
</span><br>
To see who's logged on: <span style="font-weight: bold;">rwho
leetfoomud</span><br>
To tell Biff hello: <span style="font-weight: bold;">tell</span> <span
 style="font-weight: bold;">biff@leetfoomud
hello</span><br>
To see if Biff is listening to <span style="color: rgb(0, 0, 153);">&lt;ds&gt;</span>:
<span style="font-weight: bold;">list ds@leetfoomud</span><br>
To check out Biff's personal
info: <span style="font-weight: bold;">finger
biff@leetfoomud<br>
<br>
</span><br>
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="3.3"></a><span
 style="font-weight: bold; text-decoration: underline;">That's
weird...mudlist says LeetFooMud is there but I'm not getting anything
back.</span><br style="font-weight: bold; text-decoration: underline;">
<br>
The mudlist command reports on
data retrieved the last time <br>
the intermud daemon received an
update. This means that if<br>
LeetFooMud dropped off, say, 10
minutes ago, or if your own<br>
intermud connection is down, your
intermud commands are falling <br>
into the void.<br>
<br>
To see if your intermud
connection is up, type: <span style="font-weight: bold;">wiz</span><br>
This takes you to the Creator's
Hall, where a sign indicates<br>
your mud's intermud connection
status.<span
 style="font-style: italic; font-weight: bold; color: rgb(153, 0, 0);"></span><br>
<br>
You can also test your mud's
intermud connection with<br>
the ping command, like this:<br>
<br>
<span style="font-weight: bold;">ping dead souls</span><br>
<br style="font-weight: bold;">
<span style="font-weight: bold;">ping frontiers</span><br>
<br>
<br style="font-weight: bold; text-decoration: underline;">
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="3.4"></a><span
 style="font-weight: bold; text-decoration: underline;">I
heard there are intermud channels that talk between other muds,</span><br
 style="font-weight: bold; text-decoration: underline;">
<span style="font-weight: bold; text-decoration: underline;">not
just Dead Souls muds. How can I use them?</span><br>
<br>
Ask your admin. Those channels
may not be open for<br>
use on your mud. <br>
<br>
If you talk on <span style="color: rgb(102, 102, 0);">&lt;intercre&gt;</span>,
be polite, and use the same rules<br>
of common sense and intelligent
questioning that you need<br>
to follow for <span style="color: rgb(0, 0, 153);">&lt;ds&gt;</span>. <span
 style="color: rgb(102, 102, 0);">&lt;intercre&gt;</span> is for code
and technical<br>
questions <span style="font-weight: bold;">ONLY</span>. Do not ever
spam it or use it for
chatting.<br>
<br>
I strongly discourage you from
talking on <span style="color: rgb(153, 51, 153);">&lt;intergossip&gt;</span>.
I<br>
assure you nothing good will come
of it. This warning only<br>
applies to the old intermud.org
router, known as *gjs. The<br>
intermud channel on the new
*yatmim router is much<br>
friendlier to newbies.<br>
<br>
<a name="3.5"></a><span
 style="text-decoration: underline; font-weight: bold;">How
do I emote on a channel?</span><br>
<br>
Add the word<br>
"emote" to the channel command.
For example:<br>
<br>
<span style="font-weight: bold;">creemote
compels your silence.</span><br>
<br>
gets seen on the channel as:<br>
<span style="color: rgb(0, 153, 0);">&lt;cre&gt;
</span>Cratylus compels your
silence.<br>
<br>
You can also add a colon to the
message, like this:<br>
<br>
<span style="font-weight: bold;">cre :compels
your silence.<br>
<br>
</span>or<span style="font-weight: bold;"><br>
<br>
</span></big><big style="font-family: courier new;"><span
 style="font-weight: bold;">cre: wants you to
shut up.</span></big><small style="font-family: courier new;"><br>
</small><big style="font-family: courier new;"><span
 style="font-weight: bold;"></span><br>
<br>
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="3.6"></a><span
 style="font-weight: bold; text-decoration: underline;">How
do I see what I missed on a channel?</span><br>
<br>
To see the recent messages, use
hist. For example:<br>
<br>
<span style="font-weight: bold;">hist ds</span><br>
<br>
To see older stuff, look in
/log/chan<br>
<br>
<br>
<span style="font-weight: bold;"><span style="color: rgb(204, 0, 0);"></span></span><span
 style="font-weight: bold; text-decoration: underline;"></span><a
 name="3.7"></a><span
 style="font-weight: bold; text-decoration: underline;">I
am sick and tired of the *gjs intermud network going down. Please fix
it.</span><br>
<br>
See the <a href="router.html">Dead Souls Intermud
Router page</a>.<br>
<br>
<br>
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="3.8"></a><span
 style="font-weight: bold; text-decoration: underline;">I
just wanna chat. Is there a dchat channel?</span><br>
<br>
Yes!<br>
<br>
If you really want just to chat,
then use <span style="color: rgb(0, 0, 153);">&lt;dchat</span>&gt;,<br>
since that's what it's there for.
Ask your admin for how to<br>
do this. I'd rather you expose <span style="color: rgb(0, 0, 153);">&lt;dchat&gt;</span>
to your boredom <br>
than <span style="color: rgb(153, 153, 0);">&lt;ds&gt;</span>. <br>
<br>
You can also try out <span style="color: rgb(0, 0, 153);">&lt;intergossip&gt;</span>.
Ask your admin<br>
for details on that, as well. Be warned that <span
 style="color: rgb(0, 0, 153);">&lt;intergossip&gt;</span><br>
can be expected to contain extremely coarse language and<br>
attitudes. You're really much better off not going there.<br>
<br>
Alternately, there's a <span style="color: rgb(0, 0, 153);">&lt;ds_test&gt;</span>
channel which is<br>
intended specifically for spammy
channel tests and such.<br>
<br>
<br>
<span style="font-weight: bold; text-decoration: underline;"></span><a
 name="3.9"></a><span
 style="font-weight: bold; text-decoration: underline;">I'll
spam if I want to. You're not the boss of me.</span><br>
<br>
It's true, I can't do much if
you're determined to be a<br>
jerk. If you consistently abuse
channels, your admin may<br>
be asked to limit your channel
access. In extreme cases,<br>
your mud may find itself banned
from the channel in <br>
question.<br>
I can only appeal to your sense
of fair play.<br>
Spamming hurts people who have
nothing to do with whatever<br>
you're pissed off about. Please
don't make whatever your<br>
problem is with someone a
headache for everyone.<br>
<br>
<br>
<span style="font-weight: bold;"><span style="color: rgb(204, 0, 0);"></span><span
 style="text-decoration: underline;"></span></span><a name="3.10"></a><span
 style="font-weight: bold;"><span style="text-decoration: underline;">This
guy keeps hassling me on an
intermud channel</span></span><br>
<br>
Sometimes people just can't leave
well enough alone,<br>
and they spam. Some people just
don't have anything<br>
to say that you want to hear. For
such situation,<br>
use the earmuff command. For
example:<br>
<br>
<span style="font-weight: bold;">earmuff
tatianna</span><br>
<br>
And you will not receive channel
messages from <br>
that person. The reverse command
is <span style="font-weight: bold;">unmuff</span>.<br>
Earmuffing is also good when
someone from<br>
a non-European-language mud sends
well-meaning<br>
but garbled, escape-code filled
gibberish. If<br>
she doesn't understand your
English language<br>
requests to stop spamming, you
can just earmuff her.<br>
<br>
<br>
<a name="3.11"></a><span
 style="font-weight: bold; text-decoration: underline;">What's the deal
with channel rules and banning and whatnot?</span><br>
<br>
Here are the router rules: <a
 href="http://lpmuds.net/intermud.html#rules">http://lpmuds.net/intermud.html#rules</a><br>
<br>
Basically, if you spam, or try to use the intermud router<br>
commercially, or try to use it to hack or hurt other people,<br>
or use hate speech, you're going to run into problems of<br>
some sort. If I happen to be the one catching it, you're<br>
liable to be banned for it on the spot, though I usually<br>
make numerous warnings to a mud before taking the<br>
drastic step of banning them from a channel.<br>
<br>
Note that another vector for channel banning is abusing<br>
a channel by not respecting the channel topic and customs. If<br>
you insist on swearing and/or being hostile on &lt;ds&gt; (a channel<br>
for friendly Dead Souls talk) or &lt;dchat&gt; (a channel for<br>
friendly general chat) despite being warned, you may<br>
find that you aren't able to use those channels.<br>
<br>
On the other hand, being crude and obnoxious on<br>
&lt;intergossip&gt; is entirely acceptable, within the<br>
limits of router rule 5 (no commercial advertising,<br>
hate speech, etc).<br>
<br>
Some people have found it unpleasant that I enforce the<br>
router rules. I understand that they are people who<br>
are arguing their point from a good faith belief in the<br>
righteousness of their position. However, the reality is<br>
that one guy runs the router, and enforcement is up to<br>
that one guy, and that's me.<br>
<br>
The point of the router is to have a productive environment<br>
where muds can communicate and conduct their business,<br>
promoting the health and growth of new LP muds. If I<br>
have to seem like a fascist in order for that to be<br>
so, then so be it. But being a fascist is not the point.<br>
<br>
For more context:<br>
<a href="http://dead-souls.net/articles/chanban.html">http://dead-souls.net/articles/chanban.html</a><br>
<br>
<a href="http://lpmuds.net/forum/index.php?webtag=LPC&amp;msg=177.22">http://lpmuds.net/forum/index.php?webtag=LPC&amp;msg=177.22</a><br>
<br>
</big><big style="font-family: courier new;"><br>
<a name="3.12"></a><span
 style="font-weight: bold; text-decoration: underline;">3.12 Hello?
Anyone here? Can someone answer a question for me?</span><br
 style="font-weight: bold; text-decoration: underline;">
<br>
It's usually better just to ask the question. If you just<br>
ask the question, then someone who is idle that moment,<br>
but comes back in a half hour, can see it, and answer it<br>
if they can. However, if they come back after a half<br>
hour and what they see is "can someone help me?", then<br>
they my have less interest in seeing if you're still online<br>
and still have a question.<br>
<br>
Also, keep in mind that if someone says "yes, I'm here,"<br>
now they are on the spot, and may feel obligated to<br>
help you. Folks unsure whether they can help may be <br>
reluctant to put themselves in a position where they <br>
could look silly. If you just ask, and they *do* know,<br>
they can respond.<br>
<br>
So, just ask, and realize sometimes it takes a while <br>
to get a response. If you can't wait around for an<br>
answer and don't know when you'll be back online, then<br>
post your question on the <a href="http://lpmuds.net/forum/">forum</a>.<br>
<br>
<br>
<a name="3.13"></a><span
 style="font-weight: bold; text-decoration: underline;">How come people
on IMC2 can't rwho me?</span><br>
<br>
Dead Souls 2.5a16 and above include Shadyman@QuantumScape's<br>
updates to Tim@TimMUD's IMC2 client. It works great for<br>
connecting and chatting on IMC2 channels.<br>
<br>
There may be a few kinks remaining with the other functions<br>
of IMC2 clients. This is something I hope to improve on<br>
an ongoing basis.<br>
<br>
<br>
<span style="font-weight: bold; text-decoration: underline;"><a
 name="3.14"></a>How do I find someone on Intermud-3?</span><br>
<br>
Type:<br>
<span style="font-weight: bold;">locate joe</span><br>
</big><big style="font-family: courier new;"><br>
<br>
</big>
<hr style="width: 100%; height: 2px; font-family: courier new;"><big
 style="font-family: courier new;">Section
4: Miscellanea<br>
<br>
<a name="4.1"></a><span
 style="font-weight: bold; text-decoration: underline;">I'm
fighting the beggar with my staff and he's kicking my ass</span><br>
<br>
&nbsp;&nbsp;&nbsp;
For one thing, you're a creator. Quit goofing around. If<br>
you want to
fight monsters and stuff, create a test<br>
player
character.<br>
<br>
&nbsp;&nbsp;&nbsp;
Next, you're probably still a Level 1 character. This<br>
makes you a
wimp. Raise your level with this command:<br>
<br>
<span style="font-weight: bold;">call
me-&gt;SetLevel(20)</span><br>
<br>
&nbsp;&nbsp;&nbsp;
Now get the medical tricorder from your workroom's<br>
chest and
raise your stats. Give yourself 100 strength.<br>
Why not?<br>
<br>
&nbsp;&nbsp;&nbsp;
If you're carrying a chest, table, chair, and
everything<br>
else you've
come across, you will be unable to do much <br>
during
combat. Try to wield a weapon, hold a couple of<br>
shopping bags
and boxes, and see how well you do against<br>
a pissed off
real-life enemy. You won't last long. So either<br>
drop all the
crap you're lugging around, or put it in <br>
a backpack
and wear the pack.<br>
<br>
&nbsp;&nbsp;&nbsp;
Put the staff in your robe and quit using it as<br>
a weapon.
It's a creating tool. Not only is it a<br>
poor weapon,
by default you lack double-handed<br>
weapon
skills, making you really crappy at using<br>
a really
crappy weapon. No wonder the orcs were <br>
beating you
like an animal. Get a carving knife<br>
from the
mansion. Or an orcslayer. Or hell, just<br>
use the zap
command and stop wasting time. You<br>
should have
characters for this.<br>
<br>
&nbsp;&nbsp;&nbsp; See also <a href="#2.41">Question 2.41</a><br>
<br>
<span style="font-weight: bold; text-decoration: underline;"></span><br>
<a name="4.2"></a><span
 style="font-weight: bold; text-decoration: underline;">Someone
amputated all my limbs and I can't do anything!</span><br>
<br>
If your body
gets damaged you can restore yourself to your<br>
normal
physical status by typing:<br>
<br>
<span style="font-weight: bold;">heal
me</span><br>
<span style="font-weight: bold;"></span><br>
<span style="font-weight: bold;"><span
 style="text-decoration: underline;"></span></span><br>
<a name="4.3"></a><span
 style="text-decoration: underline; font-weight: bold;">How
do I change my class?</span><br>
<span style="font-weight: bold;"></span><br>
<span style="font-weight: bold;"></span>Again
with the pretending to be a
player. Seriously,<br>
you need a
test player char so that if you screw something<br>
up, you don't
screw *yourself* up.<br>
<br>
But, if
you're determined:<span style="font-weight: bold;"></span><br>
<span style="font-weight: bold;"></span><br>
<span style="font-weight: bold;">call
me-&gt;ChangeClass("thief")</span><br>
<span style="font-weight: bold;"></span><br>
<span style="font-weight: bold;"></span>Your
stats and levels will probably be all weird and<br>
hosed up.
Just raise your player level, that will probably<br>
fix it.<span style="font-weight: bold;"></span><br>
<span style="font-weight: bold;"></span><br>
<br style="font-weight: bold; text-decoration: underline;">
<span style="font-weight: bold; text-decoration: underline;"></span><br>
<a name="4.4"></a><span
 style="font-weight: bold; text-decoration: underline;">People
are talking to me in gibberish, even though it <br>
says they're speaking English.</span><br>
<br>
If your race
is not human, your default language is not English,
therefore<br>
someone
speaking in English would not be understood by you. As a<br>
creator, you
can avoid players' tedious language learning process<br>
and simply
type:<br>
<br>
<span style="font-weight: bold;">call
me-&gt;SetLanguage("English",100)</span><br>
<br>
&nbsp;&nbsp;&nbsp;
Obviously this will work for other languages too.<br>
<br>
<br>
<span style="font-weight: bold; text-decoration: underline;"></span><br>
<a name="4.5"></a><br>
<span style="font-weight: bold; text-decoration: underline;">What's
this about Biff "unknowingly" telling me something?</span><br>
<br>
If you are
invis and a player or someone on another mud tells<br>
to you, they
get an error message about you not being around. So,<br>
they told to
you, but do not know you actually got the message,<br>
since you
don't seem logged on.<br>
<br>
<br>
<span style="font-weight: bold; text-decoration: underline;"></span><br>
<a name="4.6"></a><span
 style="font-weight: bold; text-decoration: underline;">How
do I find the location of a verb or command?</span><br>
<br>
Use the which
command. For example:<br>
<br>
<span style="font-weight: bold;">which
zap</span><br>
<br>
<span style="font-weight: bold;">which
update</span><br>
<br>
If 'which'
doesn't find it, the command is probably built into<br>
some object
you inherit, like the command shell or the<br>
hooks for the
chat daemon. Or it may be an add_action bound to a<br>
nearby
object. To see what commands objects or inherited<br>
files might
be providing you, type:<br>
<br>
<span style="font-weight: bold;">localcmds</span><br>
<span style="font-weight: bold;"></span><br>
<span style="font-weight: bold;"></span><br>
<span style="font-weight: bold;"></span><span
 style="text-decoration: underline; font-weight: bold;"></span><br>
<a name="4.7"></a> <span
 style="font-weight: bold; text-decoration: underline;">Where
are the "exa" and "n" commands?</span><br>
<br>
When you type some commands,
like <span style="font-weight: bold;">exa</span>, <span
 style="font-weight: bold;">n</span>, or <span
 style="font-weight: bold;">i</span>,<br>
what happens is that your command
shell recognizes<br>
them as aliases, and turns the
alias into the appropriate<br>
command.<br>
An alias is like a nickname, or
shorter word,<br>
for a command or series of
commands. To see the aliases<br>
you currently have, type:<br>
<span style="font-weight: bold;">alias</span><br>
<br>
To make a new alias:<br>
<span style="font-weight: bold;">alias ml
mudlist</span><br>
<br>
To make an alias that replaces a
specific command<br>
while permitting you to supply
arguments to it:<br>
<span style="font-weight: bold;">alias ig
intergossip $*</span><br>
<br>
To remove an alias:<br>
<span style="font-weight: bold;">alias ig<br>
<br>
</span>After modifying aliases,
make sure to type:<br>
<span style="font-weight: bold;">save</span><span
 style="text-decoration: underline; font-weight: bold;"></span> <br>
<br>
&nbsp;&nbsp;&nbsp;
<br>
<a name="4.8"></a> <span
 style="font-weight: bold; text-decoration: underline;">How
do I get something to happen to a random person in a room?</span><br>
<span style="font-weight: bold; text-decoration: underline;"></span>You
can
pick a
random winner (or victim) for your action by using the
get_random_living()<br>
sefun. For
details on its usage:<br>
<br>
<span style="font-weight: bold;">man
get_random_living</span><br>
<br>
You may also
find the get_livings() sefun useful.<br>
<br>
<br>
<a name="4.9"></a><span
 style="text-decoration: underline; font-weight: bold;">My
wandering monster escaped from my workroom! How can</span><br
 style="text-decoration: underline; font-weight: bold;">
<span style="text-decoration: underline; font-weight: bold;">I
find him?</span><br>
<br>
If its name is jabberwock, try:<br>
<br>
<span style="font-weight: bold;">findobj
jabberwock</span><br>
<br>
You can also probably just:<br>
<br>
<span style="font-weight: bold;">goto jabberwock</span><br>
<br style="font-weight: bold; text-decoration: underline;">
<span style="font-weight: bold; text-decoration: underline;"></span><br>
<a name="4.10"></a><span
 style="font-weight: bold; text-decoration: underline;">I
ran findobj on something but it says no environment. Where is it?</span><br>
<br>
Right where
it says. Some objects create a "master copy" of themselves<br>
when they are
cloned. This copy remains loaded in memory even if<br>
that cloned
object goes away. You can distinguish between cloned<br>
objects and
master copies by the number sign&nbsp; and number at the end<br>
of cloned
objects. The master copy has no instance number. It is <br>
simply loaded
code, and does not "exist" in a way accessible to your player<br>
object on the
mud.<br>
<br>
Sometimes a
cloned object will lose its environment. This is usually <br>
caused by an
error and is not a good thing. Dead Souls runs a<br>
"reaper"
daemon that periodically searches memory for cloned<br>
objects that
lack an environment, and they are destroyed.<br>
<br>
<br>
<span style="font-weight: bold; text-decoration: underline;"></span><br>
<a name="4.11"></a><span
 style="font-weight: bold; text-decoration: underline;">How
do I update everything in a directory?</span><br>
<br>
You really
shouldn't. There are very few cases I can think<br>
of where
updating an entire directory is something an average<br>
creator needs
to do. How often do you edit multiple<br>
files at once
without individually updating them? Good<br>
coding
practice is to update the one file you just worked on to know<br>
if it works
at all.<br>
<br>
I also
discourage it because when you do this, you lag the mud <br>
considerably.
I/O is the most resource intensive kind of operation, <br>
and updating
is on its own quite resource intensive. Updating a <br>
directory
with dozens of files in it will cause a noticeable hiccup <br>
in the rest
of the mud.<br>
<br>
If you are
determined to do this, though, the
command is :<br>
<br>
<span style="font-weight: bold;">update
/path/to/dir/*</span><br>
<br>
<br>
<span style="font-weight: bold; text-decoration: underline;"></span><br>
<a name="4.12"></a><span
 style="font-weight: bold; text-decoration: underline;">I
don't like getting colors on my screen. How do I stop it?</span><br>
<br>
Type: <span style="font-weight: bold;">terminal
unknown</span><br>
<br>
then type: <span style="font-weight: bold;">save</span><br>
<br>
<br>
<span style="text-decoration: underline; font-weight: bold;"></span><br>
<a name="4.13"></a><span
 style="text-decoration: underline; font-weight: bold;">Um...I
want colors back now please</span><br>
<br>
Type: <span style="font-weight: bold;">terminal
ansi</span><br>
<br>
then type: <span style="font-weight: bold;">save</span><br>
<br>
<br>
<span style="font-weight: bold; text-decoration: underline;"></span><br>
<a name="4.14"></a> <span
 style="font-weight: bold; text-decoration: underline;">I
can type 'n' and move north, but 'north' doesn't work.</span><br>
<br>
Technically,
you can't 'n' either. When you type 'n', what<br>
it happening
is that your preset alias turns that 'n'<br>
into the
command line '<span style="font-weight: bold;">go
north</span>'.<br>
&nbsp;&nbsp;&nbsp;
Because you do not have an alias 'north' that expands<br>
to '<span style="font-weight: bold;">go
north</span>',
'north' doesn't
take you anywhere. But<br>
<span style="font-weight: bold;">go
north</span>
will.<br>
<br>
<br>
<span style="font-weight: bold; text-decoration: underline;"></span><br>
<a name="4.15"></a> <span
 style="font-weight: bold; text-decoration: underline;">Why
is there a bunch of stuff in ROOMS_FURNACE?</span><br>
<br>
The QCS is
designed to attempt the graceful handling<br>
of unusual
events. Sloppy code, non-working objects,<br>
etc. Part of
this design is avoiding a situation<br>
where an
object's destruction affects your local <br>
environment
(and this happens a bit more often than <br>
you might
think). <br>
&nbsp;&nbsp;&nbsp;
To avoid some types of unpleasantness, QCS doesn't<br>
try to
immediately destruct objects when replacing them.<br>
Instead, they
are moved, along with whatever problems<br>
they might
have, to ROOMS_FURNACE. That is a room<br>
where things
go to be destructed quietly. Every <br>
second or so,
the contents of that room are destroyed,<br>
and their
bits recycled.<br>
&nbsp;&nbsp;&nbsp;
A few other items in the lib use the furnace,<br>
notably the
recycling bins and the reload command.<br>
<br>
<br>
<a name="4.16"></a><span
 style="font-weight: bold; text-decoration: underline;">How
do I change
my screen and terminal settings?</span><br>
<br style="font-weight: bold;">
<span style="font-weight: bold;">help
terminal</span><br style="font-weight: bold;">
<br style="font-weight: bold;">
<span style="font-weight: bold;">help
screen</span><br style="font-weight: bold;">
<br style="font-weight: bold;">
<span style="font-weight: bold;">screen
79 24</span><br>
<br>
<span style="font-weight: bold;"></span><br>
<a name="4.17"></a> <span
 style="font-weight: bold; text-decoration: underline;">ZOMG
this is the best mudlib evar how can I evar thank you?</span><br>
<br>
No need,
citizen. Merely doing my job. <br>
<br>
Just let me
know what bugs you find, and how I can<br>
make the lib
better. Also, provide help on the<br>
intermud channels for those who ask. That's how<br>
you can "give back."<br>
<br>
<br>
<a name="4.18"></a><span
 style="text-decoration: underline; font-weight: bold;">Dude
this mudlib sux0rz @ss. What a waste of my time.</span><br>
<br>
I'm sure Dead Souls has lots of
things that you don't<br>
like, but I can't fix them if I
don't know what they are.<br>
Email me so that I can understand
the lameness, and so <br>
others can benefit for your
suggestions.<br>
<br>
<br>
<a name="4.19"></a><span
 style="font-weight: bold; text-decoration: underline;">I'm
seeing a filename but I can't read it.</span><br>
<br>
If you try command and you get
something like:<br>
<br>
/secure/foo/bar: No such
reference.<br>
<br>
It means you don't have read
access to that<br>
file or directory. I've someone
make a stink about<br>
how a file they can't read
shouldn't be visible to them<br>
or some such thing. However, I
think he was just<br>
being difficult. Some files you
can't read, even<br>
though you have access to the
directory they're in.<br>
That's the story.<br>
<br>
<br>
<a name="4.20"></a><span
 style="font-weight: bold; text-decoration: underline;">Is
there a command to go back to your previous directory</span><br
 style="font-weight: bold; text-decoration: underline;">
<span style="font-weight: bold; text-decoration: underline;">without
having to type it all out again?</span><br>
<br>
The shell has a few handy
builtins.<br>
<br>
To go up a directory: <span style="font-weight: bold;">cd ..</span><br>
<br>
To go to your home dir: <span style="font-weight: bold;">cd ~</span><br>
<br>
To go to your area directory <span style="font-weight: bold;">cd ~/area</span><br>
<br>
To go to the /domains dir: <span style="font-weight: bold;">cd ^</span><br>
<br>
To go to /domains/default: <span style="font-weight: bold;">cd ^default</span><br>
<br>
To go to the directory you were
in before the current one: <span style="font-weight: bold;">cd ~-<br>
<br>
</span><br>
<a name="4.21"></a><span
 style="text-decoration: underline; font-weight: bold;">When
I'm in combat, I keep getting messages about not being</span><br
 style="text-decoration: underline; font-weight: bold;">
<span style="text-decoration: underline; font-weight: bold;">able
to fight while carrying stuff, but I only have X, Y, and Z on me.</span><br>
<br>
I was carrying some dishes to the
kitchen a while back, and it<br>
occurred to me that even if I had
a sword, if someone jumped<br>
out and started fighting me, the
first thing I'd have to do is<br>
drop anything I'm not wielding,
or get my butt kicked.<br>
<br>
The more I thought about it, the
more it made sense to set up<br>
an encumbrance system that
prevented proper fighting ability so<br>
long as you're carrying anything
that isn't worn or wielded,<br>
no matter how heavy.<br>
<br>
If you don't like this behavior,
talk to your admin abour changing<br>
the encumbrance define in
/secure/include/config.h .<br>
<br>
See also questions <a href="#2.41">2.41</a> and <a href="#4.1">4.1</a><br>
<br>
<br>
</big><big style="font-family: courier new;"><a name="4.22"></a><span
 style="font-weight: bold; text-decoration: underline;">How do light
sources work?<br>
<br>
</span>Your player object looks. This initiates a check of the
environment <br>
for light. The room has ambient light. Things in the room may have <br>
radiant light. Ambient light plus radiant light is added together. <br>
This number is given to your player object. If the number is in your<br>
vision range, you can see. Torches and flashlights work by having <br>
radiant light set.<br>
<br>
<br>
</big><big style="font-family: courier new;"><a name="4.23"></a><span
 style="font-weight: bold; text-decoration: underline;">When I control
an NPC, sometimes my commands fail oddly.</span><br
 style="font-weight: bold; text-decoration: underline;">
<br>
NPC's are intentionally simpler creatures than players. When<br>
a player's command fails, it's very important that she know why,<br>
otherwise the game can lose its fun. NPC's are not entitled to<br>
the same regard as players, and therefore their parsing and<br>
error messages are more primitive, if they exist at all.<br>
<br>
If, for example, you try to "force fighter to drop boot",<br>
you may not only have nothing happen...it might actually<br>
barf up a runtime error, on older versions of the lib.<br>
<br>
This is because NPC's don't get the full luxury of "default<br>
parsing" that players do. You can "drop boot", and if the lib<br>
has default parsing enabled, you'll just drop the first <br>
boot in your inventory. An NPC, however, may need to specify<br>
"drop first boot". And if it doesn't get the command right,<br>
that NPC may simply not receive a very helpful error message<br>
as to why.<br>
<br>
Perhaps someday the NPC's will march en masse into my workroom<br>
and demand equal rights and back pay. Until that day, however,<br>
please accept that they are just not meant to be as versatile<br>
in-game avatars as proper player objects are.<br>
<br>
<br>
</big><big style="font-family: courier new;"><a name="4.24"></a><span
 style="font-weight: bold; text-decoration: underline;">How do I make
myself able to cast my new spell?</span><br>
<br>
Normally players learn spells by learning them from an NPC<br>
that teaches it, like Herkimer. However, if you want to<br>
test new spells you've created, you can teach them to<br>
yourself this way:<br>
<br style="font-weight: bold;">
<span style="font-weight: bold;">call me-&gt;eventLearnSpell("snowball")</span><br>
<br>
However, this uses the normal player learning process,<br>
and if you don't happen to have the requisite magic<br>
skill levels, it may fail. To force yourself to know<br>
a set of spells at specific levels, you'd use the<br>
SetSpellBook() function, thusly:<br>
<br>
<span style="font-weight: bold;">call me-&gt;SetSpellBook(([ "buffer" :
100, "meditate" : 100, "snowball" : 100 ]))</span><br>
</big><big style="font-family: courier new;"><br>
</big><big style="font-family: courier new;"><br>
</big>
<hr style="width: 100%; height: 2px; font-family: courier new;"><big
 style="font-family: courier new;"><br>
<span style="font-weight: bold;">Section
5: Building</span><br>
<br>
<span style="font-weight: bold; text-decoration: underline;"><a
 name="5.1"></a>QCS is putting stuff where I don't want it.</span><br>
<br>
QCS is a way to use simple
commands to manipulate<br>
complex files. Sometimes the
conversion between simple<br>
and complex causes unusual
compromises and outcomes.<br>
<br>
When you create a new room, what
QCS does<br>
is look at the room you're
currently in. Let's say<br>
you're standing in
/realms/you/area/room/test1.c. And<br>
you issue the command<br>
<br style="font-weight: bold;">
<span style="font-weight: bold;">create room
east test2</span><br>
<br>
In this case, "test2" is
considered a "relative path",<br>
which means that you didn't
provide QCS with *exactly* where<br>
you want the file to be. You told
QCS to figure out where<br>
to put that file.<br>
When QCS has to guess where a
new room goes,<br>
it simply assumes that the room
goes in the same directory<br>
as the current room. So, in this
case, you're going to <br>
make a file with this path:<br>
<br>
/realms/you/area/room/test2.c<br>
<br>
Suppose that this is not where
you want the new<br>
room to be. you want it to go
into /realms/you/testrooms/.<br>
In this case, you need to tell
QCS the "full path", like this:<br>
<br style="font-weight: bold;">
<span style="font-weight: bold;">create room
east /realms/you/testrooms/test2</span><br>
<br>
When you create non-room
objects, also known as<br>
tangible items, QCS guesses in a
slightly different way.<br>
If you provide a relative name,
then QCS looks at your<br>
current working directory (cwd).
Based on the type of item, <br>
QCS looks for a directory with
the appropriate name. For<br>
example, if your cwd is
/realms/you/foo, and the type of<br>
object is a weapon, then QCS
looks for a directory named<br>
"/realms/you/foo/weap/". If it
exists, it puts your new<br>
file there. Otherwise it tries to
put it in "/realms/you/weap/".<br>
And if that doesn't work, it'll
default to your home area<br>
weapon directory, which is
"/realms/you/area/weap/".<br>
<br>
If you've been granted domain
admin status, and<br>
you are using QCS to work on your
new domain, it's therefore<br>
very important that your cwd be
in the right place in the<br>
domain directory for it to work.
Otherwise, your new stuff may <br>
wind up in your default area dir,
and you could go nuts<br>
trying to find it.<br>
<br>
Of course, you can avoid all
ambiguity by simply<br>
using a full path, like:<br>
<br>
<span style="font-weight: bold;">create weapon
/domains/My_Spiffy_Domain/weap/fruitcake</span><br>
<br>
&nbsp;<br>
<a name="5.2"></a><span
 style="font-weight: bold; text-decoration: underline;">How
do I make a blank room, instead of copying the current one?</span><br>
&nbsp;&nbsp;&nbsp;
You'll always copy the old room, that's just how<br>
QCS works.
But you can quickly change it to a blank<br>
room by
entering the new room and issuing this command:<br>
<br>
c<span style="font-weight: bold;">opy
/obj/room</span><br>
<br>
<br>
<span style="text-decoration: underline; font-weight: bold;"><a
 name="5.3"></a>How do I create an area?</span><br>
<br>
&nbsp;&nbsp;&nbsp;
You have a default area directory in your<br>
homedir. By
default, your QCS creations get put in there.<br>
However, if
your area is ever going to be put into<br>
play, it
could be inconvenient to move it into the<br>
/domains
directory, because every file reference will<br>
have to be
changed.<br>
&nbsp;&nbsp;&nbsp;
If your admins use unix and perl, this is trivial.<br>
If not, it's
a real obstacle.<br>
<br>
&nbsp;&nbsp;&nbsp;
Therefore, if you're going to work on an area<br>
that will
someday be open to the public, it's a <br>
good idea to
start in the /domains dir. Your admin<br>
will need to
create the appropriate directories.<br>
For example,
if the domain is to be FunkyTown, you'll<br>
need
/domains/FunkyTown, /domains/FunkyTown/room, and<br>
so on.<br>
<br>
&nbsp;&nbsp;&nbsp;
You will also need to have your admin make<br>
you a domain
admin of FunkyTown with the <span style="font-weight: bold;">domainadmin</span><br>
command. This
will permit you to use QCS there.<br>
<br>
&nbsp;&nbsp;&nbsp;
That's the technical part of getting started<br>
with an area.
The hard part is that you need to<br>
know what
you're doing, you have to have a creative<br>
vision, and
the language skills to make it evocative,<br>
immersive,
and worth playing in. That's up<br>
to you...I
can't help you with that.<br>
<br>
<br>
<span style="font-weight: bold; text-decoration: underline;"><a
 name="5.4"></a>How do I make a quest?</span><br>
&nbsp;&nbsp; <br>
Think of a quest in terms of the
result. <br>
The result of a quest is a player
receiving quest<br>
points and a quest title. <br>
&nbsp;&nbsp;&nbsp;<br>
This means that pretty much
anything can <br>
be a quest. If you've coded a
rock to provide <br>
quest points and a quest title
when it is<br>
picked up, well, there's your
Rock Quest. However,<br>
you usually want to make things a
bit more challenging. <br>
<br>
A quest can be as boring as
"pick up the red rock" <br>
or it can be a challenging
metaphysical inquiry into the <br>
nature of consciousness. If quest
points and a quest title are<br>
at the end of a series of
actions, then that series of actions<br>
is a quest. What those actions
should be are entirely up <br>
to your imagination. Review the
orcslayer quest in the <br>
Player's Handbook for an example.
You <span style="font-style: italic;">did</span> read the <br>
Player's Handbook, right?<br>
&nbsp;&nbsp; <br>
Take a look at Leo the
Archwizard's code for an example of the<br>
mechanics of solving a quest.<br>
<br>
<br>
<span style="text-decoration: underline; font-weight: bold;"><a
 name="5.5"></a>Where's
Leo?</span><br>
<br>
Read the
Player's Handbook already, please.<br>
<br>
<br>
<a name="5.6"></a><span
 style="font-weight: bold; text-decoration: underline;">Where
are the vehicles and mounts?</span><br>
<br>
As of Dead Souls 2.4.1 mounts
work for getting around and<br>
storing stuff. <br>
<br>
You can see an example of a mount by cloning a mountable horse:<br>
<br>
<span style="font-weight: bold;">clone /domains/town/npc/horse</span><br
 style="font-weight: bold;">
<span style="font-weight: bold;">befriend horse</span><br
 style="font-weight: bold;">
<span style="font-weight: bold;">mount horse</span><br
 style="font-weight: bold;">
<span style="font-weight: bold;">ride north</span><br
 style="font-weight: bold;">
<span style="font-weight: bold;">dismount</span><br
 style="font-weight: bold;">
<span style="font-weight: bold;">abandon horse</span></big><big
 style="font-family: courier new;"><br>
<br>
Mounted combat is slated for future releases.<br>
<br>
</big><big style="font-family: courier new;">As of 2.5a19, you can see
some basic sample vehicles in<br>
/domains/default/vehicles</big><big style="font-family: courier new;"><span
 style="font-weight: bold;"></span><br>
<br>
<br>
<a name="5.7"></a><span
 style="font-weight: bold; text-decoration: underline;">I'm
having trouble adding meals to my barkeep with QCS.</span><br>
<br>
Cratylus &lt;ds&gt; ok here's the
deal<br>
<br>
<span style="color: rgb(0, 102, 0);">&lt;ds&gt;
Daelas@Moraelinost scrunches on the edge of his seat.</span><br>
<br>
Cratylus &lt;ds&gt; menu items
can have more than one id<br>
<br>
<span style="color: rgb(0, 102, 0);">&lt;ds&gt;
Daelas@Moraelinost nods solemnly.</span><br>
<br>
Cratylus &lt;ds&gt; "ale","first
class ale","beer"<br>
<br>
<span style="color: rgb(0, 102, 0);">Daelas@Moraelinost
&lt;ds&gt; with you so far.</span><br>
<br>
Cratylus &lt;ds&gt; when you:
modify barkeep menuitems<br>
<br>
Cratylus &lt;ds&gt; it asks you
for the id's<br>
<br>
<span style="color: rgb(0, 102, 0);">Daelas@Moraelinost
&lt;ds&gt; I didn't get that.</span><br>
<br>
Cratylus &lt;ds&gt; when you're
done entering id's, you hit a period<br>
<br>
<span style="color: rgb(0, 102, 0);">Daelas@Moraelinost
&lt;ds&gt; is it SetMenuItems or menuitmes.</span><br>
<br>
Cratylus &lt;ds&gt; then you
enter the filename to the item sold<br>
<br>
<br>
<a name="5.8"></a><span
 style="font-weight: bold; text-decoration: underline;">I
heard DS has stargates. Where's an example?</span><br>
<br>
The following rooms have
stargates:<br>
<br>
/domains/Ylsrim/room/tower.c<br>
<br>
/domains/default/room/stargate_lab.c<br>
<br>
For info on valid gates, type: <span style="font-weight: bold;">stargate<br>
<br>
</span><br>
<a name="5.9"></a><span
 style="font-weight: bold; text-decoration: underline;">I
created a vendor, but he isn't responding to the "list" command.</span><br>
<br>
The list command isn't part of
the vendor object. It's<br>
part of LIB_SHOP, which is a room
that acts as a sort of front-end<br>
for the vendor. The commands <span style="font-weight: bold;">list</span>,
<span style="font-weight: bold;">show</span>, <span
 style="font-weight: bold;">price</span>, and <span
 style="font-weight: bold;">appraise</span> are<br>
not in the vendor, but in the
shop. To get the appropriate responses<br>
from the vendor, you would use
the following syntax:<br>
<br>
list: <span style="font-weight: bold;">ask vendor to browse</span><br>
show: <span style="font-weight: bold;">ask vendor to show
&lt;item&gt;</span><br>
price: <span style="font-weight: bold;">ask vendor to price
&lt;item&gt;</span><br>
appraise: <span style="font-weight: bold;">ask vendor to
appraise &lt;item&gt;<br>
<br>
</span><br>
<a name="5.10"></a><span
 style="font-weight: bold; text-decoration: underline;">I
gave room with a default smell but I cannot get any other smells in
there, </span><br>
<span style="font-weight: bold; text-decoration: underline;">such
as 'smell object' for example</span><br>
<br>
&nbsp;&nbsp;&nbsp;
SetSmell, like
SetListen, is in the form of a mapping. When using the<br>
QCS, the
correct formatting is automatically made for you. If coding<br>
by hand, take
a look at /domains/town/room/riverbank.c for what it<br>
looks like.
Note that for each Smell or Listen, you need a corresponding<br>
SetItems
element.<br>
<br>
<br>
<a name="5.11"></a><span
 style="font-weight: bold; text-decoration: underline;">How do I make a
weapon more powerful?</span><br>
<br>
Modify SetClass(). SetClass(20), for example, will make the weapon's<br>
raw damage (before adjusting for armor, the opponent's skills, <br>
magical protection, etc) be 20. So on a sleeping, naked, unenchanted<br>
target, the weapon (assuming the wielder is adept) would take<br>
away 20 health points on a successful strike.<br>
<br>
As you can see, there are many modifiers on a weapon's effectiveness,<br>
including the target's susceptibility to that kind of weapon. There<br>
is no written-down formula for the exact amount of damage. You'll <br>
need to make test weapons and test npc's and determine for yourself<br>
the appropriate balance.<br>
<br>
A convenient way to do this is in the arena. Type:<br>
<br>
<span style="font-weight: bold;">goto /domains/default/room/arena</span><br>
<br>
There you'll see a training dummy and an npc you can use to <br>
test your weapons and armor. The dummy talks whenever he is<br>
hit, and describes the kind and extent and location of the<br>
damage he has received. For a demonstration, type:<br>
<br>
<span style="font-weight: bold;">force fighter to kill dummy</span><br>
<br>
You can make a weapon cause a certain amount of damage regardless<br>
of protection by adding the appropriate code in in eventStrike().<br>
Please see chapter 29 of the Creator's Manual for details and examples.<br>
<br>
<br>
<a name="5.12"></a><span
 style="font-weight: bold; text-decoration: underline;">My NPC refuses
to wield his weapon!</span><br>
<br>
There are a number of reasons this might be. If it is a two-handed<br>
weapon, and he is already wielding something in one hand, that<br>
would cause a failure. If the NPC is wearing a shield, and you<br>
don't specify which hand to wield in, the NPC might default to<br>
trying to wield on the shield hand, and that would fail.<br>
<br>
To troubleshoot the problem, have the NPC wield specific things on<br>
specific limbs to see if that works. For example,<br>
<br>
<span style="font-weight: bold;">force orc wield a sword in left hand</span><br
 style="font-weight: bold;">
<span style="font-weight: bold;">force orc wield my first sword in
right hand</span><br>
<br>
etc.<br>
<br>
<br>
<a name="5.13"></a><span
 style="font-weight: bold; text-decoration: underline;">How do I add
colors to exits?</span><br>
<br>
<span style="font-weight: bold;">modify here obvious %^YELLOW%^east,
west%^RESET%^</span><br>
<br>
To make all exit messages colored, your admin would<br>
have to edit /lib/std/room.c and add the appropriate<br>
tags to the obvious exits string.<br>
<br>
<br>
<a name="5.14"></a><span
 style="font-weight: bold; text-decoration: underline;">How do i
refresh a room?</span><br>
<br>
Go to the room and type: <span style="font-weight: bold;">update<br>
<br>
<br>
<span style="text-decoration: underline;"><a name="5.15"></a>The new
room I created with QCS has SetItems I don't want</span><br>
<br>
</span>Type:<span style="font-weight: bold;"> modify here delete
SetItems<br>
<br>
<br>
</span></big><big style="font-family: courier new;"><a name="5.16"></a><span
 style="font-weight: bold; text-decoration: underline;">I'm trying to
set my NPC to have a strength of 30 but it won't work.</span><br>
<br>
You have to place the SetStat() directive *below* SetRace(), because<br>
otherwise his body's default race characteristics will clobber<br>
your custom setting.<br>
</big><big style="font-family: courier new;"><br>
<br>
-
Cratylus<br>
<br>
&lt;my name
here&gt;@comcast.net<br>
<br>
<a href="index.html">Dead
Souls Homepage</a><br>
</big>
<small style="font-family: courier new;"><br>
</small>
</body>
</html>
